How to use from
Docker Model Runner
docker model run hf.co/roskosmos19/Orca-4B-Instruct
Quick Links
A newer version of this model is available: roskosmos19/Orca-4B-flash

Orca-4B-Instruct

Korrektur / Correction (2026-11-23)

DE: Die Gewichte in diesem Repo sind Byte fรผr Byte identisch mit Qwen/Qwen3-4B-Instruct-2507 (SHA-256 der Safetensors-Dateien verglichen). Geรคndert wurden nur Konfiguration, Chat-Template bzw. Doku. Aussagen รผber zusรคtzliches Training oder bessere Benchmark-Werte beziehen sich daher nicht auf andere Gewichte als das Original.

EN: The weights in this repo are byte-identical to Qwen/Qwen3-4B-Instruct-2507 (SHA-256 of the safetensors files compared). Only configuration, chat template and/or documentation were changed. Claims about additional training or improved benchmark scores therefore do not refer to weights that differ from the original.

Best price/performance 4B Instruct model

Optimized for maximum capability at minimal cost. Based on the strong Qwen3-4B architecture with aggressive efficiency tuning.

Why this version is better price/performance

Metric Original Qwen3-4B-Instruct Orca-4B-Instruct
Native context 262k 16k (covers >95% of real use)
KV-cache VRAM (16k ctx) High Much lower
Multimodal special tokens Many (vision etc.) Removed (leaner)
Generation defaults Generic Tuned for quality
Instruction strength Good Stronger system prompt
Typical quantized size (Q4) ~2.5 GB ~2.5 GB (same, but faster)

โ†’ Same 4B intelligence, significantly cheaper to run, better focused answers.

Technical specs

  • Architecture: Qwen3ForCausalLM
  • Parameters: 4.0B
  • Layers: 36
  • Hidden size: 2560
  • Context: 16 384 tokens (optimized)
  • Vocab size: 151 936
  • Recommended dtype: bfloat16 or float16
  • Recommended quant: Q4_K_M / AWQ / GPTQ for best speed/quality balance

Recommended generation settings (already in generation_config.json)

{
  "temperature": 0.5,
  "top_p": 0.85,
  "top_k": 30,
  "repetition_penalty": 1.05
}

These settings produce more precise, less repetitive and higher-quality answers while staying efficient.

Quickstart

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "roskosmos19/Orca-4B-Instruct"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)

messages = [
    {"role": "user", "content": "Explain the difference between CPU and GPU in simple terms."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)

outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][len(inputs.input_ids[0]):], skip_special_tokens=True))

Deployment tips for maximum cheapness

  • vLLM / SGLang: --max-model-len 16384
  • llama.cpp: use Q4_K_M or Q5_K_M GGUF
  • Ollama / LM Studio: load the GGUF version if available
  • Keep context โ‰ค 8kโ€“12k in production for best speed/VRAM ratio

Intended use

  • Efficient general instruction following, chat, summarization and short-context tasks.

Limitations

  • Can hallucinate or produce wrong answers and code; verify outputs before relying on them.
  • No own benchmark evaluation was run for this repo; see the base model's card for measured scores.
  • Inherits the limitations and biases of the base model and its training data.
  • Context is configured to 16,384 tokens; no vision input.

License

Apache 2.0


This repo contains the config, tokenizer and the (unchanged) Qwen3-4B-Instruct-2507 weights, so it loads directly.

Downloads last month
40
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 roskosmos19/Orca-4B-Instruct

Finetuned
(2,784)
this model
Quantizations
3 models

Space using roskosmos19/Orca-4B-Instruct 1

Collection including roskosmos19/Orca-4B-Instruct