Downloads · 30 days
23
3% of all-time downloads
nurl-lang/Qwen3-4B-NURL
Qwen3-4B-NURL is a text generation model from nurl-lang. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Qwen3-4B finetuned to write NURL — a compiled systems programming language with terse prefix notation, compile-time ownership with automatic drops, and a self-hosted compiler.
Downloads · 30 days
23
3% of all-time downloads
All-time downloads
722
Public
Parameters
4B
16.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.2 GB · 100%
From the Hugging Face model README
Qwen3-4B finetuned to write NURL — a compiled systems programming language with terse prefix notation, compile-time ownership with automatic drops, and a self-hosted compiler.
The base model knows nothing about NURL (it invents Rust-like syntax); this model writes idiomatic NURL:
@ sum_vec ( Vec i ) v → i {
: i n ( vec_len [i] v )
: ~ i total 0
: ~ i k 0
~ < k n {
: i val ( vec_get [i] v k )
= total + total val
= k + k 1
}
^ total
}
Trained entirely with nurllama — the pure-NURL LLM engine — on a single RTX 4090 (24 GB):
nurllama finetune Qwen3-4B-Q8_0.gguf train.txt \
--steps 4000 --seq 56 --rank 16 --alpha 32 --lr 2e-4 \
--mixed --stream --window-stride 0 \
--checkpoint ckpt.st --save-every 200 --resume
--window-stride 0 samples the whole corpus
evenly with a golden-ratio window permutation.nurllama finetune --merge-only: base + (α/r)·A·B written
as this repo's sharded model-*.safetensors (F32, true HF lane order —
loads in transformers unchanged via model.safetensors.index.json).nurl-lora-adapters.safetensors carries the raw LoRA pairs in nurllama's
own format (blk.<L>.<proj>.lora_a/b), usable with
nurllama run <base.gguf> --weights after a --merge-only, or re-merged
against the base at any α.With transformers (chat template included):
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("nurl-lang/Qwen3-4B-NURL")
model = AutoModelForCausalLM.from_pretrained("nurl-lang/Qwen3-4B-NURL")
msgs = [{"role": "user", "content": "Write a NURL function that adds two integers."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
print(tok.decode(model.generate(ids, max_new_tokens=80)[0]))
With nurllama (the engine it was trained in) — download the 132 MB adapters instead of the 16 GB merged model, and merge locally against the base GGUF (identical result, byte for byte):
nurllama pull hf.co/Qwen/Qwen3-4B-GGUF/Qwen3-4B-Q8_0.gguf --name qwen3-4b
curl -LO https://huggingface.co/nurl-lang/Qwen3-4B-NURL/resolve/main/nurl-lora-adapters.safetensors
nurllama finetune ~/.nurllama/blobs/<qwen3-4b-blob> /dev/null \
--out nurl-lora-adapters.safetensors --merged qwen3-4b-nurl.st \
--alpha 32 --stream --merge-only
nurllama run qwen3-4b "<prompt>" --weights qwen3-4b-nurl.st # one-shot
nurllama serve --weights qwen3-4b-nurl.st # ollama-compatible API
Base model: Qwen/Qwen3-4B (Apache-2.0).
Tokenizer and configuration are the base model's, unchanged (tied embeddings;
lm_head is the embedding table, as in the base).