Instructions to use Unbabel/TowerInstruct-7B-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Unbabel/TowerInstruct-7B-v0.1 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="Unbabel/TowerInstruct-7B-v0.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Unbabel/TowerInstruct-7B-v0.1") model = AutoModelForCausalLM.from_pretrained("Unbabel/TowerInstruct-7B-v0.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Context length
#9
by nedrad88s - opened
Thanks for the model!
What is the model's context length?
In config.jsonL
''max_positional_embeddings" = 4096
Is it the context length?
Thanks!
No problem!
We SFTed the model given a max sequence length of 2048 tokens.
It is possible that the model can perform beyond that sequence length (up to 4096 tokens), but we haven't really performed any tests in that regard.
Thanks for the quick response!
nedrad88s changed discussion status to closed