How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="LindotAI/Lin-1-Locus")
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("LindotAI/Lin-1-Locus")
model = AutoModelForCausalLM.from_pretrained("LindotAI/Lin-1-Locus", 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]:]))
Quick Links

Lin-1 Locus

Lin-1 Locus is a 4B-parameter code model from LindotAI, specialized for Rust. It is fine-tuned from Qwen3.5-4B on curated, test-verified Rust data and answers directly (no long reasoning traces), which keeps it fast enough for local use.

Highlights

  • Writes idiomatic, compiling Rust: functions, traits, generics, error handling, iterators, unit tests.
  • Trained only on code that passed compilation and/or its own tests.
  • Strong sampling diversity: high pass@10 makes it a good fit for generate-and-test loops.
  • Runs locally: a Q8_0 GGUF is included (~4.5 GB).

Benchmarks

Lin-1 Locus vs open code models

Benchmarks

All numbers measured by us with the same harness for every model (Rust ports of the benchmarks; generated code is compiled and run against the tests).

Model HumanEval-Rust p@1 / p@10 MBPP-Rust p@1 / p@10 Holdout (Rust) LBPP-Rust
Lin-1 Locus (4B) 73.1 / 86.1 63.4 / 73.1 58.7 27.5
Lin-1 Epsilon Preview (0.5B) 48.4 / 65.2 41.3 / 54.2 30.3 4.1
Temper 2 Nodel 73.3 / 81.8 64.7 / 70.6 55.4 26.4
Qwen2.5-Coder-7B-Instruct 72.4 / 82.6 60.5 / 70.0 โ€” โ€”
Qwen3.5-4B (base) 66.2 / 81.4 57.7 / 73.4 โ€” โ€”
Qwen3-4B 59.8 / 64.8 55.6 / 60.6 โ€” โ€”
Qwen2.5-Coder-3B-Instruct 56.5 / 71.9 44.8 / 60.0 โ€” โ€”
Qwen2.5-Coder-1.5B-Instruct 39.0 / 56.1 38.3 / 52.1 โ€” โ€”
Qwen3.5-2B 31.7 / 51.3 36.0 / 53.2 โ€” โ€”

Holdout is our private set of Rust tasks with tests that was never used for training.

Quick start

Transformers

from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "LindotAI/Lin-1-Locus"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")

messages = [{"role": "user", "content": "Write a Rust function that returns the n-th Fibonacci number using u128, with tests."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=1024, temperature=0.2, do_sample=True)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))

vLLM

vllm serve LindotAI/Lin-1-Locus --max-model-len 8192

llama.cpp / Ollama (GGUF)

llama-cli -m Lin-1-Locus-Q8_0.gguf -p "Write a Rust function that parses a CSV line into Vec<String>."

Recommended sampling: temperature 0.2 for single answers, 0.8 when sampling several candidates and testing them.

Training

  1. Supervised fine-tuning of Qwen3.5-4B on Rust instruction data and the model's own test-verified answers (rejection sampling).
  2. Supervised fine-tuning on curated Rust from permissively licensed sources: files from The Stack Edu (Rust subset) that compile and pass their own unit tests, and compile-checked samples from Strandset-Rust.

All training data was decontaminated against the evaluation sets (12-gram overlap filter).

Limitations

  • Focused on Rust; other languages work but are not the target.
  • 4B parameters: complex multi-file projects and long-horizon agentic tasks remain hard.
  • Always compile and test generated code.

License

Apache 2.0, same as the base model.

Downloads last month
120
Safetensors
Model size
4B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for LindotAI/Lin-1-Locus

Finetuned
Qwen/Qwen3.5-4B
Quantized
(686)
this model
Quantizations
2 models