Instructions to use IndexTeam/Index-Nailong-2B-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IndexTeam/Index-Nailong-2B-FP8 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="IndexTeam/Index-Nailong-2B-FP8")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("IndexTeam/Index-Nailong-2B-FP8") model = AutoModelForMultimodalLM.from_pretrained("IndexTeam/Index-Nailong-2B-FP8", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download validation.json from IndexTeam/Index-Nailong-2B-FP8: direct link, hf CLI and curl.
- Browser
- Download file 2.98 kB
-
https://huggingface.co/IndexTeam/Index-Nailong-2B-FP8/resolve/main/validation.json
- Command line
-
hf download hf://IndexTeam/Index-Nailong-2B-FP8/validation.json
-
curl -L -o validation.json https://huggingface.co/IndexTeam/Index-Nailong-2B-FP8/resolve/main/validation.json
2.98 kB
| { | |
| "bf16": { | |
| "ppl": 3.2805126104685187, | |
| "generations": { | |
| "zh2en": "Artificial intelligence is profoundly changing the way content is created, automating everything from text translation to video dubbing.", | |
| "en2zh": "嗯,用户让我翻译一段英文到中文,内容是“The quick brown fox jumps over the lazy dog, while the rain in Spain stays mainly in the plain.”。首先,我需要确认这段英文的准确性。看起来像是《The Tale of the Two Cities》中的句子,可能用户是在引用这段文字。\n\n接下来,我要确保翻译的准确性。第一句“The quick brown fox jumps over the lazy dog”,这里的“quick”是“快速的”,“brown”是“棕色的”,“fox”是“狐狸”,“jumps over”是“跳过去”,“lazy dog”是“懒狗”。所以整句应该是“棕色的狐狸快速跳过懒狗”。不过,中文里可能更自然的说法是“棕色的狐狸跳过了懒狗”,或者“棕色的狐狸跳过了懒狗”。\n\n第二句“while the rain in Spain stays mainly in the plain.”,“while”在这里表示“同时”或“与此同时”,“rain”是“雨”,“Spain”是“西班牙”,“stays mainly in the plain”中的“stays”是“停留”,“mainly”是“主要”,“plain”是“平原”。所以整句应该是“而西班牙的雨主要停留在平原上。”或者“而西班牙" | |
| } | |
| }, | |
| "fp8": { | |
| "ppl": 3.3116363101191633, | |
| "generations": { | |
| "zh2en": "Artificial intelligence is profoundly changing the way content is created, automating everything from text translation to video dubbing.", | |
| "en2zh": "嗯,用户让我翻译一段英文到中文,内容是“The quick brown fox jumps over the lazy dog, while the rain in Spain stays mainly in the plain.”。首先,我需要确认这段英文的准确意思。看起来像是一个绕口令或者谜语,可能来自某个特定的语境,比如儿童读物或者谜语集。\n\n接下来,我要考虑用户的需求。用户可能希望得到一个准确且符合中文习惯的翻译,同时保持原句的趣味和结构。因为这段英文本身就是一个绕口令,所以翻译时不仅要准确,还要有节奏感,可能还需要调整语序,使其更符合中文的表达方式。\n\n然后,我需要逐句分析。第一句“The quick brown fox jumps over the lazy dog”,这里的关键是“quick brown fox”和“lazy dog”。需要找到合适的中文对应词,比如“棕色的狐狸”和“懒狗”。然后动作“jumps over”翻译成“跳过去”比较合适。第二句“while the rain in Spain stays mainly in the plain”,这里“rain”是“雨”,“stays mainly in the plain”可能需要处理为“主要停留在平原上”或者“主要待在平原里”。\n\n接下来,我要检查是否有常见的翻译错误。比如“stays mainly in the plain”是否应该" | |
| } | |
| } | |
| } |