Instructions to use NiuTrans/LMT-60-4B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NiuTrans/LMT-60-4B-Base 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-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NiuTrans/LMT-60-4B-Base") model = AutoModelForCausalLM.from_pretrained("NiuTrans/LMT-60-4B-Base") - Notebooks
- Google Colab
- Kaggle
Improve Model Card: Update pipeline_tag, add library_name, and correct language tag
#1
by nielsr HF Staff - opened
This PR enhances the model card by:
- Updating the
pipeline_tag: Changed fromtranslationtotext-generation. While the model is used for translation, it functions as a large language model (LLM) for text generation, makingtext-generationa more accurate and discoverable primary pipeline tag on the Hugging Face Hub. - Adding
library_name: Addedlibrary_name: transformersto the metadata. Evidence from theQuickstartcode snippet (usingtransformers.AutoModelForCausalLMandAutoTokenizer) confirms compatibility with the Hugging Face Transformers library, enabling the automated "how to use" widget. - Correcting
languagetag: Correctedfalsetono(Norwegian) in thelanguagemetadata, aligning with the "Support Languages" table in the model card and GitHub README, which lists Norwegian as a supported language.
These changes improve the model's discoverability and usability for users.