Instructions to use IndexTeam/Index-Nailong-2B-FP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IndexTeam/Index-Nailong-2B-FP4 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-FP4")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("IndexTeam/Index-Nailong-2B-FP4") model = AutoModelForMultimodalLM.from_pretrained("IndexTeam/Index-Nailong-2B-FP4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download validation.json from IndexTeam/Index-Nailong-2B-FP4: direct link, hf CLI and curl.
- Browser
- Download file 2.92 kB
-
https://huggingface.co/IndexTeam/Index-Nailong-2B-FP4/resolve/main/validation.json
- Command line
-
hf download hf://IndexTeam/Index-Nailong-2B-FP4/validation.json
-
curl -L -o validation.json https://huggingface.co/IndexTeam/Index-Nailong-2B-FP4/resolve/main/validation.json
2.92 kB
| { | |
| "bf16": { | |
| "ppl": 3.280632848386617, | |
| "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”是“平原”。所以整句应该是“而西班牙的雨主要停留在平原上。”或者“而西班牙" | |
| } | |
| }, | |
| "fp4": { | |
| "ppl": 3.499796213595705, | |
| "generations": { | |
| "zh2en": "Artificial intelligence is profoundly changing the way content is created, from text translation to video dubbing, all of which can be automated.", | |
| "en2zh": "好的,用户让我翻译一段英文到中文,内容是“The quick brown fox jumps over the lazy dog, while the rain in Spain stays mainly in the plain.”。首先,我需要确认这句话的正确翻译。\n\n首先,分解句子结构。The quick brown fox jumps over the lazy dog,这里的主语是The quick brown fox,动词是jumps,宾语是the lazy dog。然后while引导的从句,The rain in Spain stays mainly in the plain。这里的rain是名词,指西班牙的雨,stays mainly in the plain是“主要待在平原上”。\n\n接下来,考虑中文的表达习惯。The quick brown fox这个短语是“棕色的狐狸”,而jumps over是“跳过去”,所以整句可能是“棕色的狐狸跳过去”。而while引导的从句,The rain in Spain stays mainly in the plain,这里rain是“雨”,stays mainly in the plain是“主要待在平原上”,所以可以翻译为“西班牙的雨主要待在平原上”。\n\n然后,把整个句子组合起来,可能需要调整语序。原句的结构是The quick brown fox jumps over the lazy dog, while the rain in Spain stays mainly in the plain. 中文通常会把while引导的从句放在前面,所以可能翻译" | |
| } | |
| } | |
| } |