Quark-150M-128K-Base trained with reinforcement learning (GRPO) directly, with no supervised fine-tuning stage: a small chat model that can think in a private monologue and call tools.
Research artifact. This model is released for research on small language models: architecture, training dynamics, long context and reinforcement learning from a base model. It is not a product and has not been evaluated for production use. Its only safety training is a small set of refusal tasks during RL, and its safety has not been evaluated. Like any small language model, it makes factual and reasoning errors and can produce biased or harmful text. Do not use it for decisions that affect people, or deploy it without your own evaluation and safeguards.
| Parameters | 165.3M (140.0M without embeddings) |
| Layers | 16 (12 local, 4 global) |
| Context | 131,072 tokens |
| Training tokens | ~506B pretraining, then RL |
| Vocabulary | 32,772 (embedding table padded to 32,896) |
| Weights | float32 safetensors |
This is the RL model. It was trained with GRPO starting from
Quark-150M-128K-Base, with no supervised fine-tuning stage ("zero", as in
RL-from-base). It answers in the chat format, can think first in a [MONOLOGUE] (it decides when, or you can ask it to
with enable_thinking=True), and can call tools.
| Model | What it is |
|---|---|
| Quark-150M-32K-Raw | Pre-anneal checkpoint: end of the constant learning-rate phase (~472B tokens, trained at up to 4K context) |
| Quark-150M-32K-Base | Base model after the 32K-context anneal (~500B tokens) |
| Quark-150M-128K-Base | Base model extended to 128K context (+10B tokens) |
| Quark-150M-128K-Zero | Reinforcement learning (GRPO) straight from the 128K base, without supervised fine-tuning |
These come from training rollouts and our in-house task suite, not from held-out benchmarks.
Requires transformers>=5.23 (tested with 5.23.0) and trust_remote_code=True (the modeling code ships
with the weights).
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "empero-ai/Quark-150M-128K-Zero"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda")
messages = [{"role": "user", "content": "Explain in two sentences why the sky is blue."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt",
return_dict=True).to("cuda")
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
apply_chat_template(..., enable_thinking=True) opens a [MONOLOGUE] and the model thinks before it
answers. Without add_generation_prompt, the model chooses for itself whether to think, call a tool or answer.[/ASSISTANT], [/TOOL_CALL] or <|endoftext|> (set in generation_config.json).tools=[...], either Hugging Face/OpenAI-style function specs or
{"name", "description", "parameters": {arg: {"type": ...}}}. When the model stops at [/TOOL_CALL], run the call,
append {"role": "tool_result", "content": result}, and generate again.Turns are wrapped in tags, and each tag is a single special token:
<|endoftext|>[SYSTEM]
You are quark, a helpful assistant made by Empero AI
[/SYSTEM]
[USER]
What is 2 + 3?
[/USER]
[MONOLOGUE]
Two plus three is five.
[/MONOLOGUE]
[ASSISTANT]
5
[/ASSISTANT]
[SYSTEM] and [MONOLOGUE] (the model's private thinking) are optional. <|endoftext|> marks the start of a
document; the tokenizer and the chat template add it.
The 128K models also have tool-call tokens. Tools are offered in the system turn, and the template writes
them for you from tools=[...]. The model calls a tool with
[TOOL_CALL] {"name": ..., "arguments": {...}} [/TOOL_CALL]. The caller runs the tool and appends the result as a
[TOOL_RESULT] ... [/TOOL_RESULT] turn (role tool_result, or tool), then the model continues.
Generated with the code above in float32, one run per prompt with the settings shown: nothing was re-rolled or selected. Generation stops at <|endoftext|>, [/ASSISTANT] or [/TOOL_CALL], or at the token limit. Special tokens are shown as text; the prompt is everything up to where the model's output begins.
Chat (greedy, up to 200 new tokens)
Prompt:
[USER]
Hi! Who are you?
[/USER]
[ASSISTANT]
Output:
I am quark, and I am here to chat with you.
[/ASSISTANT]
Chat (greedy, up to 200 new tokens)
Prompt:
[USER]
Explain in two sentences why the sky is blue.
[/USER]
[ASSISTANT]
Output:
The sky looks blue because sunlight is made of all colors and when it hits the air, the blue light scatters in all directions more than the others.
[/ASSISTANT]
Chat (greedy, up to 200 new tokens)
Prompt:
[USER]
Write a haiku about autumn.
[/USER]
[ASSISTANT]
Output:
The leaves turn gold and red, falling from the trees like a gentle rain.
[/ASSISTANT]
Chat with thinking (enable_thinking=True) (greedy, up to 200 new tokens)
Prompt:
[USER]
A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?
[/USER]
[MONOLOGUE]
Output:
Say the ball costs $1.10 more than the bat.
So the bat costs $1.10 + $1.00 = $2.10.
Answer: $2.10.
[/MONOLOGUE]
[ASSISTANT]
$2.10
[/ASSISTANT]
Chat with a web-search tool offered (the model chooses how to continue) (greedy, up to 200 new tokens)
Prompt:
[SYSTEM]
You are quark, a helpful assistant made by Empero AI
[TOOLS]
You have the following tools available:
[
{"name": "web_search", "description": "Search the web.", "parameters": {"query": {"type": "string"}}}
]
To use a tool, write a tool call in this format:
[TOOL_CALL]
{"name": <tool name>, "arguments": {<argument>: <value>, ...}}
[/TOOL_CALL]
Example:
[TOOL_CALL]
{"name": "web_search", "arguments": {"query": "<query>"}}
[/TOOL_CALL]
The result comes back in a [TOOL_RESULT] block. Then call another tool, or answer in [ASSISTANT]. You may think in [MONOLOGUE] before or after a call.
Only call the tools listed above, with exactly their arguments. Never write a [TOOL_RESULT] yourself. If no tool is needed, answer directly.
[/TOOLS]
[/SYSTEM]
[USER]
Who won the most recent Nobel Prize in Literature?
[/USER]
Output:
[TOOL_CALL]
The answer is Literature, Nobel laureate Elena Ferrante.
[/ASSISTANT]
The weights and code are released under the Apache License 2.0.
Compute for this work was partly sponsored by lium.io.