Translation
Transformers
Safetensors
English
Chinese
llama
text-generation
text-generation-inference
Instructions to use Mxode/NanoTranslator-M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mxode/NanoTranslator-M 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="Mxode/NanoTranslator-M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Mxode/NanoTranslator-M") model = AutoModelForCausalLM.from_pretrained("Mxode/NanoTranslator-M") - Notebooks
- Google Colab
- Kaggle
metadata
license: gpl-3.0
NanoTranslator-L
Introduction
这是 NanoTranslator 的 Large 型号,目前仅支持英译中。仓库中同时提供了 ONNX 版本的模型。
| Size | Params. | V. | H. | I. | L. | Att. H. | KV H. | Tie Emb. |
|---|---|---|---|---|---|---|---|---|
| XL | 50 M | 8000 | 320 | 1792 | 24 | 16 | 4 | True |
| L | 22 M | 8000 | 256 | 1408 | 16 | 16 | 4 | True |
| M | 10 M | 4000 | 176 | 960 | 16 | 16 | 4 | True |
| S | 2 M | 2000 | 96 | 512 | 12 | 12 | 4 | True |
- V. - vocab size
- H. - hidden size
- I. - intermediate size
- L. - num layers
- Att. H. - num attention heads
- KV H. - num kv heads
- Tie Emb. - tie word embeddings