Text Generation
Transformers
Safetensors
Uzbek
English
Russian
qwen3_5_text
qwen3.5
uzbek
conversational
translation
text-generation-inference
non-commercial
Instructions to use NeuronUz/NeuronAI-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuronUz/NeuronAI-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NeuronUz/NeuronAI-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NeuronUz/NeuronAI-4B") model = AutoModelForCausalLM.from_pretrained("NeuronUz/NeuronAI-4B", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NeuronUz/NeuronAI-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeuronUz/NeuronAI-4B" # 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-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NeuronUz/NeuronAI-4B
- SGLang
How to use NeuronUz/NeuronAI-4B 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-4B" \ --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-4B", "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-4B" \ --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-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NeuronUz/NeuronAI-4B with Docker Model Runner:
docker model run hf.co/NeuronUz/NeuronAI-4B
Clarify held-out-source fertility methodology
Browse files- README.md +10 -8
- assets/tokenizer_fertility.png +2 -2
- fertility_large_20260825.json +3 -3
- fertility_large_20260825.md +6 -5
README.md
CHANGED
|
@@ -176,8 +176,8 @@ was fractionally lower at checkpoint 3564.
|
|
| 176 |
The tokenizer is an in-place, primarily **Latin-script Uzbek** retrofit rather
|
| 177 |
than a vocabulary extension. The initial 20,000-document figure was measured on
|
| 178 |
training-source `uz-crawl`, so we replaced it with a larger corpus-stratified
|
| 179 |
-
test: 118,832
|
| 180 |
-
|
| 181 |
sampling (seed `20260825`), exact duplicates were excluded from the selected
|
| 182 |
sample, tiny texts were filtered, and raw source text was tokenized without
|
| 183 |
apostrophe normalization.
|
|
@@ -186,11 +186,11 @@ apostrophe normalization.
|
|
| 186 |
|
| 187 |
| Corpus | Status | Documents | Words | NeuronAI-4B | Qwen3.5-4B | Reduction (95% CI) |
|
| 188 |
| --- | --- | ---: | ---: | ---: | ---: | ---: |
|
| 189 |
-
| Community OSCAR Uzbek |
|
| 190 |
-
| Uzbek legal corpus |
|
| 191 |
-
| uz-crawl |
|
| 192 |
|
| 193 |
-
Across the two
|
| 194 |
fewer tokens overall**. The script split is essential: it uses **40.90% fewer
|
| 195 |
tokens on Latin-dominant text**, but only **0.15% fewer on Cyrillic-dominant
|
| 196 |
text**. NeuronAI-4B should therefore be described as Latin-Uzbek optimized, not
|
|
@@ -198,8 +198,10 @@ equally optimized for both Uzbek scripts.
|
|
| 198 |
|
| 199 |
The paired intervals use 5,000 bootstrap replicates over 1,000 deterministic
|
| 200 |
document buckets. OSCAR may still have incidental overlap with other public web
|
| 201 |
-
corpora
|
| 202 |
-
|
|
|
|
|
|
|
| 203 |
script/length breakdowns: [`fertility_large_20260825.json`](fertility_large_20260825.json)
|
| 204 |
and [`fertility_large_20260825.md`](fertility_large_20260825.md).
|
| 205 |
|
|
|
|
| 176 |
The tokenizer is an in-place, primarily **Latin-script Uzbek** retrofit rather
|
| 177 |
than a vocabulary extension. The initial 20,000-document figure was measured on
|
| 178 |
training-source `uz-crawl`, so we replaced it with a larger corpus-stratified
|
| 179 |
+
test: 118,832 held-out-source documents plus a separate 100,000-document
|
| 180 |
+
training-source control. Documents were selected with deterministic SHA-256 bottom-k
|
| 181 |
sampling (seed `20260825`), exact duplicates were excluded from the selected
|
| 182 |
sample, tiny texts were filtered, and raw source text was tokenized without
|
| 183 |
apostrophe normalization.
|
|
|
|
| 186 |
|
| 187 |
| Corpus | Status | Documents | Words | NeuronAI-4B | Qwen3.5-4B | Reduction (95% CI) |
|
| 188 |
| --- | --- | ---: | ---: | ---: | ---: | ---: |
|
| 189 |
+
| Community OSCAR Uzbek | Held-out web source | 100,000 | 7,618,770 | **2.0304** | 3.3639 | **39.64%** (39.57β39.71%) |
|
| 190 |
+
| Uzbek legal corpus | Held-out legal source/domain | 18,832 | 2,534,566 | **2.3747** | 2.9705 | **20.06%** (19.55β20.57%) |
|
| 191 |
+
| uz-crawl | Training-source control | 100,000 | 20,825,680 | **2.3206** | 3.3224 | **30.15%** (30.02β30.30%) |
|
| 192 |
|
| 193 |
+
Across the two held-out sources combined, the tokenizer uses **35.19%
|
| 194 |
fewer tokens overall**. The script split is essential: it uses **40.90% fewer
|
| 195 |
tokens on Latin-dominant text**, but only **0.15% fewer on Cyrillic-dominant
|
| 196 |
text**. NeuronAI-4B should therefore be described as Latin-Uzbek optimized, not
|
|
|
|
| 198 |
|
| 199 |
The paired intervals use 5,000 bootstrap replicates over 1,000 deterministic
|
| 200 |
document buckets. OSCAR may still have incidental overlap with other public web
|
| 201 |
+
corpora and was previously checked in a post-hoc weak-token coverage analysis,
|
| 202 |
+
but it contributed no tokenizer-training rows. The legal corpus does not appear
|
| 203 |
+
in the tokenizer or training source manifests and is the cleanest source-and-domain
|
| 204 |
+
holdout in this test. Full results and
|
| 205 |
script/length breakdowns: [`fertility_large_20260825.json`](fertility_large_20260825.json)
|
| 206 |
and [`fertility_large_20260825.md`](fertility_large_20260825.md).
|
| 207 |
|
assets/tokenizer_fertility.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
fertility_large_20260825.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
| 17 |
},
|
| 18 |
"corpora": {
|
| 19 |
"OSCAR Uzbek": {
|
| 20 |
-
"domain_status": "
|
| 21 |
"source": "xkas2001/uzbek-language-dataset, community-oscar-uzbek/all_metadata_text.txt",
|
| 22 |
"sampling": {
|
| 23 |
"records_scanned": 4762756,
|
|
@@ -239,7 +239,7 @@
|
|
| 239 |
}
|
| 240 |
},
|
| 241 |
"Uzbek legal corpus": {
|
| 242 |
-
"domain_status": "
|
| 243 |
"source": "sukhrobnurali/uzbek-legal-corpus-v1, articles",
|
| 244 |
"sampling": {
|
| 245 |
"records_scanned": 21021,
|
|
@@ -438,7 +438,7 @@
|
|
| 438 |
}
|
| 439 |
},
|
| 440 |
"uz-crawl control": {
|
| 441 |
-
"domain_status": "
|
| 442 |
"source": "tahrirchi/uz-crawl local training source",
|
| 443 |
"sampling": {
|
| 444 |
"records_scanned": 1618035,
|
|
|
|
| 17 |
},
|
| 18 |
"corpora": {
|
| 19 |
"OSCAR Uzbek": {
|
| 20 |
+
"domain_status": "held-out web source",
|
| 21 |
"source": "xkas2001/uzbek-language-dataset, community-oscar-uzbek/all_metadata_text.txt",
|
| 22 |
"sampling": {
|
| 23 |
"records_scanned": 4762756,
|
|
|
|
| 239 |
}
|
| 240 |
},
|
| 241 |
"Uzbek legal corpus": {
|
| 242 |
+
"domain_status": "held-out legal source/domain",
|
| 243 |
"source": "sukhrobnurali/uzbek-legal-corpus-v1, articles",
|
| 244 |
"sampling": {
|
| 245 |
"records_scanned": 21021,
|
|
|
|
| 438 |
}
|
| 439 |
},
|
| 440 |
"uz-crawl control": {
|
| 441 |
+
"domain_status": "training-source control",
|
| 442 |
"source": "tahrirchi/uz-crawl local training source",
|
| 443 |
"sampling": {
|
| 444 |
"records_scanned": 1618035,
|
fertility_large_20260825.md
CHANGED
|
@@ -7,13 +7,14 @@ The confidence interval is a paired 5,000-replicate bootstrap over 1,000 determi
|
|
| 7 |
|
| 8 |
| Corpus | Domain status | Documents | Words | NeuronAI-4B | Qwen3.5-4B | Token reduction (95% CI) |
|
| 9 |
| --- | --- | ---: | ---: | ---: | ---: | ---: |
|
| 10 |
-
| OSCAR Uzbek |
|
| 11 |
-
| Uzbek legal corpus |
|
| 12 |
-
| uz-crawl control |
|
| 13 |
|
| 14 |
## Interpretation
|
| 15 |
|
| 16 |
-
- The out-
|
| 17 |
- Exact web overlap cannot be ruled out for OSCAR because both corpora ultimately derive from public web data.
|
| 18 |
-
-
|
|
|
|
| 19 |
- Results use raw source text without apostrophe normalization or other model-specific preprocessing.
|
|
|
|
| 7 |
|
| 8 |
| Corpus | Domain status | Documents | Words | NeuronAI-4B | Qwen3.5-4B | Token reduction (95% CI) |
|
| 9 |
| --- | --- | ---: | ---: | ---: | ---: | ---: |
|
| 10 |
+
| OSCAR Uzbek | held-out web source | 100,000 | 7,618,770 | 2.0304 | 3.3639 | 39.64% (39.57%β39.71%) |
|
| 11 |
+
| Uzbek legal corpus | held-out legal source/domain | 18,832 | 2,534,566 | 2.3747 | 2.9705 | 20.06% (19.55%β20.57%) |
|
| 12 |
+
| uz-crawl control | training-source control | 100,000 | 20,825,680 | 2.3206 | 3.3224 | 30.15% (30.02%β30.30%) |
|
| 13 |
|
| 14 |
## Interpretation
|
| 15 |
|
| 16 |
+
- The held-out-source corpora are the fairness readout; the training-source corpus is retained only as a control.
|
| 17 |
- Exact web overlap cannot be ruled out for OSCAR because both corpora ultimately derive from public web data.
|
| 18 |
+
- OSCAR was checked in a post-hoc weak-token coverage analysis but contributed no tokenizer-training rows.
|
| 19 |
+
- The legal corpus is absent from the tokenizer and CPT source manifests and is the cleanest source-and-domain holdout in this run.
|
| 20 |
- Results use raw source text without apostrophe normalization or other model-specific preprocessing.
|