Translation
Transformers
Safetensors
Japanese
English
llama
text-generation
text-generation-inference
Instructions to use lmg-anon/vntl-llama3-8b-v2-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lmg-anon/vntl-llama3-8b-v2-hf 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="lmg-anon/vntl-llama3-8b-v2-hf")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lmg-anon/vntl-llama3-8b-v2-hf") model = AutoModelForCausalLM.from_pretrained("lmg-anon/vntl-llama3-8b-v2-hf") - Notebooks
- Google Colab
- Kaggle
Update Tokenizer Chat Template (#1)
Browse files- Update Tokenizer Chat Template (fe1c29cada0b72760adb64f24851a0c360833adb)
Co-authored-by: Equinox Psychosis <Casual-Autopsy@users.noreply.huggingface.co>
- tokenizer_config.json +1 -1
tokenizer_config.json
CHANGED
|
@@ -2050,7 +2050,7 @@
|
|
| 2050 |
}
|
| 2051 |
},
|
| 2052 |
"bos_token": "<|begin_of_text|>",
|
| 2053 |
-
"chat_template": "{
|
| 2054 |
"clean_up_tokenization_spaces": true,
|
| 2055 |
"eos_token": "<|eot_id|>",
|
| 2056 |
"extra_special_tokens": {},
|
|
|
|
| 2050 |
}
|
| 2051 |
},
|
| 2052 |
"bos_token": "<|begin_of_text|>",
|
| 2053 |
+
"chat_template": "{%- for message in messages %}\n {%- if loop.index0 == 0 %}\n {{- bos_token }}\n {%- endif %}\n {%- if message['role'] == 'system' %}\n {{- '<|start_header_id|>Metadata<|end_header_id|>\n\n' + message['content'] + eos_token }}\n {%- endif %}\n {%- if message['role'] == 'user' %}\n {{- '<|start_header_id|>Japanese<|end_header_id|>\n\n' + message['content'] + eos_token }}\n {%- endif %}\n {%- if message['role'] == 'assistant' %}\n {{- '<|start_header_id|>English<|end_header_id|>\n\n' + message['content'] + eos_token }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>English<|end_header_id|>\n\n' }}\n{%- endif %}",
|
| 2054 |
"clean_up_tokenization_spaces": true,
|
| 2055 |
"eos_token": "<|eot_id|>",
|
| 2056 |
"extra_special_tokens": {},
|