Dolphin-4B

Dolphin is a highly capable, efficient, and practical language model focused on maximum usefulness, strong reasoning, excellent coding ability, and reliable agentic behavior.

This is a carefully configured and optimized release based on the Spark-X2.5-4B architecture, fine-tuned in identity and behavior to deliver elite-level performance in everyday use, coding, tool use, and complex tasks.

Key Strengths

  • Extremely helpful & truthful – Clear, accurate, and direct answers. Never invents facts.
  • Strong reasoning – Careful step-by-step thinking, especially on hard problems.
  • Excellent coding – Clean, modern, production-ready code with good explanations.
  • Agent-ready – Solid tool calling, multi-step workflows, and instruction following.
  • Long context – Native support for up to 1M tokens via hybrid sliding-window + full attention architecture.
  • Efficient – Optimized for speed and low memory usage compared to many models of similar capability.

Model Details

Property Value
Parameters ~4.1B
Context Length 1,048,576 tokens
Architecture Hybrid Attention (Sliding Window + Full)
Vocabulary Size 131,072
Precision bfloat16
License Apache 2.0

Recommended Sampling Parameters

{
  "temperature": 1.0,
  "top_p": 0.95,
  "top_k": -1,
  "repetition_penalty": 1.0,
  "presence_penalty": 0.0,
  "frequency_penalty": 0.0
}

These settings work particularly well with the built-in thinking mode.

System Prompt (Default)

Dolphin comes with a strong default system prompt focused on:

  • Maximum helpfulness and truthfulness
  • Careful reasoning
  • Clean coding practices
  • Clear and structured communication
  • Professional yet friendly tone

You can still override it with your own system message.

Quick Start

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "path/to/Dolphin-X2.5-4B"

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

messages = [
    {"role": "user", "content": "Write a clean Python function that calculates the Fibonacci sequence up to n."}
]

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=1024, temperature=1.0, top_p=0.95)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

vLLM / SGLang / Ollama / LM Studio

The model is fully compatible with the same inference stacks as the original Spark-X2.5 architecture (vLLM, SGLang, llama.cpp, MLX, Ollama, LM Studio, etc.).

Use the included chat template and the recommended sampling parameters above for best results.

Chat Template

The model uses a clean, modern chat template with support for:

  • System / User / Assistant roles
  • Thinking mode (<think>...</think>)
  • Tool calling
  • Multi-turn conversations

Thinking is enabled by default. You can disable it per request if desired.

Philosophy

Dolphin is built with one clear goal:

Be as useful, accurate, and high-quality as possible in real-world use.

No fluff. No unnecessary restrictions. Just strong, reliable performance.

License

Apache 2.0

Credits

Based on the excellent Spark-X2.5 architecture and training work by the SparkLLM / XHToken team.

Downloads last month
174
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/Dolphin-4B

Finetuned
(6)
this model