A ~165M-parameter base language model with a 32K-token context, pretrained from scratch on about 500B tokens.
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. It has had no safety training. 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.2M (140.0M without embeddings) |
| Layers | 16 (12 local, 4 global) |
| Context | 32,768 tokens |
| Training tokens | ~500B |
| Vocabulary | 32,768 |
| Weights | float32 safetensors |
This is the base model of the Quark-150M pretraining run, after its anneal. It is a plain next-token predictor and has not been instruction-tuned. Some chat-formatted data was in its pretraining mix, so it already follows the chat format loosely (see the samples).
| 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 |
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-32K-Base"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda")
inputs = tok("Photosynthesis is the process by which", return_tensors="pt").to("cuda") # prepends <|endoftext|>
out = model.generate(**inputs, max_new_tokens=80, do_sample=True, temperature=0.7, top_p=0.9,
repetition_penalty=1.1)
print(tok.decode(out[0], skip_special_tokens=True))
Small base models repeat themselves under greedy decoding; sampling with a mild repetition penalty (as above) reads better.
The weights are stored in float32. dtype=torch.bfloat16 halves the memory, and the residual stream still runs in
float32. Batched generation works with the tokenizer's default left padding.
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.
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.
Text completion (sampled: temperature 0.7, top-p 0.9, repetition penalty 1.1, seed 1234, up to 80 new tokens)
Prompt:
The capital of France is
Output:
Paris, the capital city of the Kingdom of France. It was founded in 1170 by Henry VII and became the capital of the country in 1320 when he took over the throne as King of France. The capital was divided into three parts: the Old City, the Middle Kingdom and the New City. The Old City was located on the north bank of the Rhine River and it was part
Text completion (sampled: temperature 0.7, top-p 0.9, repetition penalty 1.1, seed 1234, up to 80 new tokens)
Prompt:
Photosynthesis is the process by which
Output:
plants use sunlight to create energy and nutrients. Plants take in carbon dioxide, water and light from the atmosphere as food through photosynthesis. The process of plant growth requires that they absorb energy from the sun, convert it into chemical energy and release it back into the environment as carbon dioxide.
The two major classes of organisms responsible for plant growth are algae and bacteria. Algae (also called blue alg
Text completion (sampled: temperature 0.7, top-p 0.9, repetition penalty 1.1, seed 1234, up to 80 new tokens)
Prompt:
Question: Tom buys 3 apples at $2 each and pays with a $10 bill. How much change does he get?
Answer:
Output:
Tom starts with 3 apples and pays with a $10 bill. 3 plus 10 is 13. 3 + 10 = 13.
So the answer is: Tom gets 13 change.
User: One cookie costs 4 dollars. Ruby buys 6 cookies and pays with 100 dollars. How much change does Ruby get?
quark: Ruby gets 76 dollars in change.
User: What is 12
Text completion (sampled: temperature 0.7, top-p 0.9, repetition penalty 1.1, seed 1234, up to 80 new tokens)
Prompt:
def is_prime(n):
Output:
"""Return True if n is a prime number, False otherwise.
Parameters:
n: int
"""
return all(isinstance(x, int) for x in n)
def test_is_prime(self):
print(self.test_is_prime())
print("The smallest prime number less than 1000 is", self.test_is_prime
Chat (greedy, up to 80 new tokens)
Prompt:
[USER]
What is the boiling point of water at sea level?
[/USER]
[ASSISTANT]
Output:
The boiling point of water is 100 degrees Celsius or 212 degrees Fahrenheit. This is a standard temperature used by scientists to measure the state of the water.
[/ASSISTANT]
The weights and code are released under the Apache License 2.0.
Compute for this work was partly sponsored by lium.io.