Instructions to use NiuTrans/LMT-60-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NiuTrans/LMT-60-4B 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="NiuTrans/LMT-60-4B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NiuTrans/LMT-60-4B") model = AutoModelForCausalLM.from_pretrained("NiuTrans/LMT-60-4B") - Notebooks
- Google Colab
- Kaggle
Add `library_name: transformers` to model card metadata
#1
by nielsr HF Staff - opened
This PR updates the model card to include the library_name: transformers in its metadata. This will enable the automatic display of a "how to use" code snippet on the Hugging Face Hub, improving discoverability and ease of use for users of the transformers library.
The Quickstart section in the current model card already demonstrates compatibility with transformers, providing the necessary evidence for this addition. All other existing information, including the paper link, GitHub link, and sample usage, remains as is.