Text Generation
Transformers
Safetensors
Uzbek
English
qwen3_5_text
qwen3.5
uzbek
conversational
translation
text-generation-inference
Run this model with HF Jobs
Run NeuronUz/NeuronAI-2B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/NeuronUz/NeuronAI-2B. Ask me which dataset to train on, then push the LoRA adapter to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs and Transformers to run batch inference with https://huggingface.co/NeuronUz/NeuronAI-2B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the predictions back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs and Lighteval to evaluate https://huggingface.co/NeuronUz/NeuronAI-2B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/NeuronUz/NeuronAI-2B with Transformers and bitsandbytes. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use NeuronUz/NeuronAI-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuronUz/NeuronAI-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NeuronUz/NeuronAI-2B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NeuronUz/NeuronAI-2B") model = AutoModelForCausalLM.from_pretrained("NeuronUz/NeuronAI-2B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NeuronUz/NeuronAI-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeuronUz/NeuronAI-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeuronUz/NeuronAI-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NeuronUz/NeuronAI-2B
- SGLang
How to use NeuronUz/NeuronAI-2B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "NeuronUz/NeuronAI-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeuronUz/NeuronAI-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "NeuronUz/NeuronAI-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeuronUz/NeuronAI-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NeuronUz/NeuronAI-2B with Docker Model Runner:
docker model run hf.co/NeuronUz/NeuronAI-2B
Release NeuronAI 2B LoRA r64 checkpoint 4749
Browse filesReplace the previous full-parameter SFT release with the merged CPT+anneal, grouped-v4 LoRA r64 checkpoint 4749. Updates model card with the completed eight-task COMET-primary suite and BLEU results.
Files changed (4)
- README.md+81-148
- config.json+4-1
- model.safetensors+1-1
- tokenizer_config.json+1-1
11 unmodified lines121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271287 unmodified lines1361371381391401411424 unmodified lines1471481491501511522 unmodified lines15515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622711 unmodified lines- text-generation- conversational- axolotl---# Qwen3.5 2B Uzbek Fine-TunedA text-only Qwen3.5 2B checkpoint for Uzbek instruction following andconversation, with English retained. Uzbek continued pretraining and annealing,then a full-parameter supervised fine-tune.This release replaces the earlier LoRA-broad checkpoint. It scores higher onevery benchmark below and, unlike its predecessor, **stops generating on itsown** — the previous checkpoints never learned to emit the turn terminator andneeded sentence counters and repetition penalties to produce usable output. Theusage example below is correspondingly plain.## Model lineage1. `Qwen/Qwen3.5-2B-Base`2. Uzbek tokenizer extension (vocabulary 248,320) and embedding initialization3. Uzbek continued pretraining4. Annealing5. Full-parameter supervised fine-tuning (no LoRA — these are the trained weights)## Benchmarks### Comparison with alloma-1B and alloma-3BRun with the benchmark protocol published in the **alloma model card** — itstasks, datasets and prompts, used verbatim — so the comparison does not dependon prompt formats chosen by us. alloma's required APST apostrophe preprocessingis applied to the alloma models. Full test splits, greedy decoding. COMET is`Unbabel/wmt22-comet-da`. Higher is better throughout.| Benchmark | **This model** (1.88B) | alloma-1B (1.24B) | alloma-3B (3.21B) || --- | ---: | ---: | ---: || Uzbek sentiment analysis | **93.09** | 58.05 | 81.53 || Uzbek news classification | **56.47** | 15.85 | 33.78 || MMLU (English) | **52.81** | 28.61 | 45.34 || BLEU uz→en | 21.04 | 16.10 | **24.62** || COMET uz→en | 81.06 | 80.08 | **85.14** || BLEU en→uz | 9.85 | 8.70 | **14.54** || COMET en→uz | 83.82 | 81.20 | **86.80** |Read this honestly, in both directions:- This model beats **alloma-1B on every metric**, and beats the ~1.7x larger**alloma-3B on classification and English knowledge** by wide margins(sentiment +11.6, news +22.7, MMLU +7.5).- **alloma-3B is clearly better at translation**, in both directions and on bothBLEU and COMET. If translation quality is your priority, alloma-3B is thestronger choice, and alloma-8B stronger still.### Full public suiteOur own eight-task Uzbek suite, vLLM backend, full test splits, greedy decoding.Shown against this model's predecessor and the stock instruct model.| Benchmark | Metric | **This model** | Previous release (LoRA broad) | Qwen3.5-2B-Instruct (stock) || --- | --- | ---: | ---: | ---: || UzLiB | accuracy | **0.4863** | 0.4782 | 0.2880 || TUMLU-Uzbek | accuracy | **0.3214** | 0.3686 | 0.3129 || News classification | accuracy | **0.7948** | 0.7355 | 0.3675 || Sentiment (binary) | accuracy | **0.9626** | 0.9348 | 0.7676 || MMLU (English) | accuracy | **0.5422** | 0.5300 | 0.5241 || MMLU (Uzbek) | accuracy | **0.4707** | 0.4640 | 0.3711 || FLORES+ en→uz | BLEU | **9.90** | 4.05 | 4.16 || FLORES+ en→uz | COMET | **0.8496** | 0.7413 | 0.6790 || FLORES+ uz→en | BLEU | **23.07** | 5.93 | 17.13 || FLORES+ uz→en | COMET | **0.8314** | 0.6056 | 0.8091 || **Weighted score** | | **0.4388** | 0.4190 | 0.3154 |The weighted score combines all eight tasks (UzLiB 0.20, TUMLU 0.20, en→uz 0.15,news 0.10, MMLU-en 0.10, MMLU-uz 0.10, uz→en 0.05, sentiment 0.05), with BLEUscaled to a 0–1 range.The alloma models are deliberately **not** listed in this second table. They weremeasured on it (alloma-1B 0.2242, alloma-3B 0.2666), but those runs fail thesuite's own output-validity gate: alloma-3B produced unparseable answers on 44.1%of sentiment items and 28.7% of TUMLU items under our prompt formats, versus0.0% invalid for this model. Those scores measure compliance with our prompttemplates, not model capability, so quoting them as a head-to-head result wouldoverstate this model. The alloma-protocol table above is the fair comparison.Notes on reading these numbers honestly:- **Translation is where the gain over the previous release is largest** (en→uzBLEU 4.05 → 9.90, uz→en 5.93 → 23.07). Much of that is the terminator fix: theprevious checkpoint ran past the end of its answer, which BLEU punishesseverely.- **TUMLU-Uzbek regressed** (0.3686 → 0.3214) and is this model's weakest task.It is also near the 0.25 random baseline for 4-choice questions, so treatUzbek multi-subject knowledge as unreliable.- Invalid-output rate was 0.0000 on all format-scored tasks.- The checkpoint published here is the one that scored best on this suite(1.5 epochs), selected across all 12 training checkpoints. It is not the finalepoch-3 weights, which scored 0.4310.## Training summary- Framework: Axolotl / Transformers- Method: full-parameter supervised fine-tuning- Data: 169,919 conversational examples (Uzbek-first, with task-format andEnglish retention data)- Sequence length: 2,048, one sample per sequence (no packing)- Epochs: 3, best checkpoint by benchmark score taken at 1.5 epochs- Effective batch size: 32- Learning rate: 1e-5, cosine schedule, 3% warmup- Optimizer: AdamW, β₂ = 0.95, gradient clipping 1.0- Precision: bf16- Loss on assistant turns only; `<|im_end|>` trained as the turn terminatorThe training data is not included in this repository.## Usage7 unmodified linesmodel = AutoModelForCausalLM.from_pretrained(model_id,dtype=torch.bfloat16,device_map="cuda:0", # keep this hybrid model on a single device)messages = [4 unmodified linesinputs = tokenizer.apply_chat_template(messages,add_generation_prompt=True,return_tensors="pt",return_dict=True,).to(model.device)2 unmodified linesoutput = model.generate(**inputs, max_new_tokens=512, do_sample=False)reply = tokenizer.decode(output[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True).strip()print(reply)```No stopping criteria, repetition penalty, or `no_repeat_ngram_size` are needed —the model emits `<|im_end|>`, and `generation_config.json` already registers itas an end-of-sequence token.### Multi-turn chat```pythonmessages = [{"role": "system", "content": "Siz foydali AI yordamchisiz."}]while True:user = input("> ").strip()if user in {"", "exit", "quit"}:breakmessages.append({"role": "user", "content": user})inputs = tokenizer.apply_chat_template(messages,add_generation_prompt=True,return_tensors="pt",return_dict=True,).to(model.device)with torch.inference_mode():output = model.generate(**inputs, max_new_tokens=512, do_sample=False)reply = tokenizer.decode(output[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True).strip()print(reply)messages.append({"role": "assistant", "content": reply})```### vLLM```pythonfrom vllm import LLM, SamplingParamsllm = LLM(model="NeuronUz/qwen3.5-2b-fine-tuned", max_model_len=4096)params = SamplingParams(temperature=0.0, max_tokens=512)messages = [{"role": "system", "content": "Siz foydali AI yordamchisiz."},{"role": "user", "content": "Bugungi ob-havo haqida nima deya olasiz?"},]print(llm.chat(messages, params)[0].outputs[0].text)```### Notes- Requires a Transformers release with Qwen3.5 support.- Greedy decoding (`do_sample=False`) was used for all benchmark numbers above.For sampling, a reasonable starting point is `temperature=0.7`, `top_p=0.8`,`top_k=20`.- Avoid `device_map="auto"` when several GPUs are visible: currentAccelerate/Transformers releases may split the Qwen3.5 hybrid layers acrossdevices and produce invalid text. Pin the model to one device as shown.## LimitationsThe model may produce inaccurate, biased, or fabricated information. Uzbekmulti-subject knowledge (TUMLU) is close to the random baseline, so factualanswers in specialist domains should not be trusted. It has not beencomprehensively evaluated for safety or high-stakes use. Verify outputsindependently before relying on them in medical, legal, financial, or otherconsequential settings.11 unmodified lines12131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293947 unmodified lines1021031041051061071084 unmodified lines1131141151161171181192 unmodified lines12212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916011 unmodified lines- text-generation- conversational- axolotl- peft- lora---# NeuronAI 2B`NeuronUz/qwen3.5-2b-fine-tuned` is an Uzbek-first, text-only Qwen3.5 2Bassistant model with English capability retained. The published weights are amerged checkpoint: no adapter is required at inference time.This release updates the repository to the best overall checkpoint from the2026-08-18 LoRA r64 checkpoint sweep (`checkpoint-4749`, one SFT epoch). Itreplaces the previous full-parameter SFT checkpoint.## Model lineage1. `Qwen/Qwen3.5-2B-Base`2. Uzbek tokenizer extension and embedding initialization3. Uzbek continued pretraining4. Annealing5. Assistant-only supervised fine-tuning with LoRA r646. LoRA merged into the base weights for deploymentThe model is called **NeuronAI 2B** in its identity training examples.## EvaluationThe four retained checkpoints were evaluated on the same strict eight-taskpublic suite using full test splits, greedy vLLM decoding, and COMET-primarytranslation scoring. Checkpoint 4749 achieved the best normalized weightedscore. All format-scored tasks had a 0% invalid-output rate.| Benchmark | Metric | Checkpoint 4749 || --- | --- | ---: || UzLiB | accuracy | 0.49597 || TUMLU-Uzbek | accuracy | 0.32571 || FLORES+ en→uz | COMET | 0.87615 || FLORES+ en→uz | BLEU | 12.00 || Uzbek news classification | accuracy | 0.78549 || MMLU (English) | accuracy | 0.54066 || MMLU (Uzbek) | accuracy | 0.46852 || FLORES+ uz→en | COMET | 0.85347 || FLORES+ uz→en | BLEU | 27.21 || Uzbek sentiment (binary) | accuracy | 0.95500 || **Normalized weighted score** | COMET-primary | **0.59542** |Suite weights were UzLiB 0.20, TUMLU 0.20, en→uz COMET 0.15, news 0.10,MMLU-en 0.10, MMLU-uz 0.10, uz→en COMET 0.05, and sentiment 0.05, normalizedover their total weight of 0.95.Checkpoint 1188 scored higher on UzLiB (0.54326), but checkpoint 4749 wasselected because it was stronger overall, particularly in translation,classification, and sentiment.## Training summary- Base: Uzbek CPT + anneal checkpoint- Method: LoRA, merged for release- LoRA rank/alpha/dropout: 64 / 128 / 0.05- LoRA targets: all linear layers- Trainable adapter parameters: 67,276,800- Training data: 152,152 grouped and globally deduplicated examples- Validation data: 1,537 grouped examples- Train/dev prompt-group overlap: 0- Sequence length: 2,048- Packing: disabled- Epochs: 1- Effective batch size: 32- Learning rate: 1e-4, cosine schedule, 3% warmup- Optimizer: AdamW, beta2 0.95, weight decay 0.01- Precision: bf16 with selected recurrent parameters retained in fp32- Loss: assistant turns only; `<|im_end|>` explicitly supervisedThe training mixture is Uzbek-first and includes clean general assistant data,translation, Uzbek language and literature, spelling and orthography, MMLU-styletasks, classification, math, and English-retention examples. Training data isnot distributed in this model repository.## Usage7 unmodified linesmodel = AutoModelForCausalLM.from_pretrained(model_id,dtype=torch.bfloat16,device_map="cuda:0",)messages = [4 unmodified linesinputs = tokenizer.apply_chat_template(messages,add_generation_prompt=True,enable_thinking=False,return_tensors="pt",return_dict=True,).to(model.device)2 unmodified linesoutput = model.generate(**inputs, max_new_tokens=512, do_sample=False)reply = tokenizer.decode(output[0][inputs["input_ids"].shape[-1]:],skip_special_tokens=True,).strip()print(reply)```The model emits `<|im_end|>` and the generation metadata registers both`<|im_end|>` and `<|endoftext|>` as end-of-sequence tokens.### vLLM```pythonfrom vllm import LLM, SamplingParamsllm = LLM(model="NeuronUz/qwen3.5-2b-fine-tuned",max_model_len=4096,)params = SamplingParams(temperature=0.0, max_tokens=512)messages = [{"role": "system", "content": "Siz foydali AI yordamchisiz."},{"role": "user", "content": "O'zbekiston haqida qisqacha ma'lumot bering."},]print(llm.chat(messages, params)[0].outputs[0].text)```## Notes and limitations- Use a Transformers/vLLM release with Qwen3.5 support.- Keep the hybrid Qwen3.5 model on one device unless the serving stack has beenvalidated for multi-device Gated-DeltaNet inference.- TUMLU-Uzbek remains close to the 0.25 random baseline, so specialist factualknowledge should be independently verified.- The model may produce inaccurate, biased, or fabricated information and hasnot been comprehensively evaluated for safety or high-stakes use.
6 unmodified lines789101112136 unmodified lines"attn_output_gate": true,"bos_token_id": null,"dtype": "float32","eos_token_id": 248044,"full_attention_interval": 4,"head_dim": 256,"hidden_act": "silu",6 unmodified lines789101112131415166 unmodified lines"attn_output_gate": true,"bos_token_id": null,"dtype": "float32","eos_token_id": [248046,248044],"full_attention_interval": 4,"head_dim": 256,"hidden_act": "silu",
123version https://git-lfs.github.com/spec/v1oid sha256:d39d981c03f63bb711d44ab9a7fb963dc118f57eef0cc00bff9d39543e086f03size 4781022144123version https://git-lfs.github.com/spec/v1oid sha256:7b3667d6eb7841e22ebf2c8290e8fdf02c6cafdb9cb913c73d944abf31b2161asize 4781022144
9 unmodified lines101112131415169 unmodified lines"errors": "replace","image_token": "<|image_pad|>","is_local": true,"local_files_only": true,"model_max_length": 262144,"model_specific_special_tokens": {"audio_bos_token": "<|audio_start|>",9 unmodified lines101112131415169 unmodified lines"errors": "replace","image_token": "<|image_pad|>","is_local": true,"local_files_only": false,"model_max_length": 262144,"model_specific_special_tokens": {"audio_bos_token": "<|audio_start|>",
README.md+81-148
config.json+4-1
model.safetensors+1-1
tokenizer_config.json+1-1