Text Generation
Transformers
Safetensors
Uzbek
English
Russian
neuron_lm
uzbek
o'zbek
chat
instruction-tuned
conversational
custom_code
Run this model with HF Jobs
Run NeuronUz/MustaqiLLM 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/MustaqiLLM. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/NeuronUz/MustaqiLLM on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/NeuronUz/MustaqiLLM. 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/MustaqiLLM. 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/MustaqiLLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuronUz/MustaqiLLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NeuronUz/MustaqiLLM", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("NeuronUz/MustaqiLLM", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NeuronUz/MustaqiLLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeuronUz/MustaqiLLM" # 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/MustaqiLLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NeuronUz/MustaqiLLM
- SGLang
How to use NeuronUz/MustaqiLLM 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/MustaqiLLM" \ --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/MustaqiLLM", "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/MustaqiLLM" \ --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/MustaqiLLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NeuronUz/MustaqiLLM with Docker Model Runner:
docker model run hf.co/NeuronUz/MustaqiLLM
Generation settings: replace guessed defaults with swept, measured recommendations
Browse files67 unmodified lines68697071717273747518 unmodified lines949596969797989910010110210310410510610710810911011111211311411511611711811912012112210310410512312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315467 unmodified lines out = model.generate( **inputs, max_new_tokens=256, do_sample=False, # greedy; see Generation settings below do_sample=False, # greedy is fine for a short answer like this; # for open chat use the sampling settings below eos_token_id=5, # <|im_end|> -- also the repo default pad_token_id=3, # <pad> )18 unmodified lines{assistant}<|im_end|>```
A system turn is optional. Uzbek-language system prompts work best — that is what themodel was trained with.A system turn is optional, and for general chat you should leave it out — a genericsystem prompt measurably increases repetition (see Generation settings). Task-specificsystem prompts, in Uzbek, work well.
### Generation settings
These are measured, not guessed: 24 Uzbek chat prompts across 11 categories, 2–3 seedsper configuration, scored automatically for verbatim sentence repetition, failure toemit `<|im_end|>` within the token budget, and script leakage.
**Recommended for open chat:**
```pythonout = model.generate( **inputs, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.9, repetition_penalty=1.10, # not optional -- see below use_cache=True,)```
| setting | value | why ||---|---|---|| `eos_token_id` | **5** (`<\|im_end\|>`) | The turn terminator, and already the default in `config.json` / `generation_config.json` — you do not need to pass it. Do **not** override it with the pretraining EOS (`</s>`), which never appears in chat data: generation would then run to `max_new_tokens`. || `do_sample` | `False` for classification/extraction; `True`, `temperature≈0.7`, `top_p≈0.9` for open chat | `generation_config.json` ships `do_sample: true` with no temperature or top_p set, so pass these explicitly. Every benchmark below was measured greedy. || `dtype` | `torch.bfloat16` | Trained in bf16. || `repetition_penalty` | **1.05–1.10** for chat | The single most important setting. Without it the model restates whole sentences verbatim. Measured duplicate-sentence rate at temperature 0.7: **4.7% at `1.00`, 2.1% at `1.02`, 0.0% at `1.05` and above.** || `do_sample` / `temperature` / `top_p` | `True`, `0.7`, `0.9` for chat; `False` (greedy) for classification, extraction and short answers | `generation_config.json` ships `do_sample: true` with **no** `temperature` or `top_p`, so the unconfigured default is temperature 1.0 / top_p 1.0 — pass these explicitly. Terse tasks showed a 0% repetition rate under every configuration tested, so greedy is safe there. || `eos_token_id` | **5** (`<\|im_end\|>`) | The turn terminator, already the default in `config.json` / `generation_config.json` — you do not need to pass it. Do **not** override it with the pretraining EOS (`</s>`), which never appears in chat data: generation would then run to `max_new_tokens`. || system prompt | **omit it** for general chat | A generic system turn measurably degrades output. Duplicate-sentence rate over the same prompts: **0.0% with no system prompt, 1.9% with a generic Uzbek one, 5.2% with a generic English one** (at temperature 0.7, `repetition_penalty` 1.05); without a repetition penalty the same comparison is 11.2% / 23.7% / 14.9%. Task-specific system prompts (a required format, a persona) are fine — it is the generic "you are a helpful assistant" turn that hurts. || `dtype` | `torch.bfloat16` | Trained in bf16. `float16` is also safe — no overflow, and output quality is indistinguishable — so pre-Ampere GPUs are supported. `float32` doubles memory for **half** the throughput (205 vs 412 tok/s) and changes nothing. |
**Greedy decoding degrades as the output gets longer**, which is why it is recommendedabove only for short outputs. On chat and long-form prompts with a 768-token budget:
| configuration | never emits `<\|im_end\|>` | duplicate sentences | worst case ||---|---:|---:|---:|| greedy | 23.1% | 27.3% | one sentence repeated **9.8×** || `t=0.7, top_p=0.9` | 15.4% | 8.0% | 2.2× || `t=0.7, top_p=0.9, rp=1.05` | 11.5% | 3.0% | 1.7× || **`t=0.7, top_p=0.9, rp=1.10`** | **0.0%** | **0.8%** | **1.1×** |
Lowering the temperature makes this worse, not better: temperature 0.3 was the worstconfiguration measured (19.1% duplicate sentences), because sharpening the distributionlocks the model into the repeat loop. Determinism is genuinely in tension with qualityhere: greedy plus `repetition_penalty=1.10` still leaves 7.9% duplicate sentences —better than greedy alone, but far short of sampling. If you need reproducible output,sample with a fixed seed rather than decoding greedily.
Uzbek Cyrillic prompting is the weakest case — the highest truncation and repetitionrates of any category — so raise `max_new_tokens` and keep the repetition penalty on.
Batch size changes greedy output: identical prompts decoded at batch 1 and batch 12matched in only 24 of 32 cases, because left-padding shifts the numerics. Fix the batchsize when comparing runs.
Memory: the checkpoint is 11.0 GB on disk (embeddings and `lm_head` are stored fp32); loading with`dtype=torch.bfloat16` as above casts them down to ~10.3 GB of weights, so a single 16 GB GPU isREADME.md+52-6