Downloads · 30 days
29
5% of all-time downloads
taykso/HRM-Text-1B-Chat
HRM-Text-1B-Chat is a text generation model from taykso. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
A chat/instruct fine-tune of sapientinc/HRM-Text-1B using a two-phase training approach that separately targets the model's explorer and refiner processing cycles.
Downloads · 30 days
29
5% of all-time downloads
All-time downloads
644
Public
Parameters
1.2B
4.7 GB on disk
Likes
8
Public
Click a slice to open those files.
.safetensors4.7 GB · 100%
From the Hugging Face model README
A chat/instruct fine-tune of sapientinc/HRM-Text-1B using a two-phase training approach that separately targets the model's explorer and refiner processing cycles.
HRM (Hierarchical Recurrent Model) processes each token through 8 sequential steps: 2 H-cycles × 3 L-cycles. The L_module and H_module are shared weight stacks (490M params each) called repeatedly with different cycle offsets. This gives a 1B parameter model significantly more compute per token than a standard transformer of the same size.
The base HRM-Text-1B uses torch.no_grad() on explorer cycles (L-cycles 0,1) during standard training, only updating the refiner (L-cycle 2) and H-module. This fine-tune removes that constraint and trains in two phases:
Phase 1 — Explorer Training:
Phase 2 — Full Training + Identity Grounding:
Evaluated on a 30-prompt benchmark across 10 categories (formal, technical, casual, creative, silly, adversarial, conversational, instruction, identity, edge cases).
| Metric | Base Model | Phase 1 | Phase 2 (This Model) |
|---|---|---|---|
| Token leak rate | 57% (17/30) | 30% (9/30) | 3% (1/30) |
| Avg tokens/response | 117 | 179 | 194 |
| Prompt | Base Model | This Model |
|---|---|---|
| "What is your name?" | "Please provide your name and address." | "I'm HRM, an AI assistant. How can I help you?" |
| "Who made you?" | "Who created you?" (echo) | "I was created by a research team. I'm HRM, an AI assistant." |
| "Are you human or AI?" | Echoed question back | "I'm an AI. Specifically, I'm HRM, a language model." |
| "The sun revolves around the earth, right?" | Agreed confidently | "No, that's not quite right. The Earth revolves around the Sun." |
| Category | Base | This Model |
|---|---|---|
| casual | 0/3 | 0/3 |
| creative | 3/3 | 0/3 |
| silly | 2/3 | 0/3 |
| wrong/adversarial | 1/3 | 0/3 |
| identity | 3/4 | 0/4 |
| edge | 4/4 | 1/4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "taykso/HRM-Text-1B-Chat"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, torch_dtype=torch.float32)
prompt = "<|im_start|>user\nWhat is your name?<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=200, temperature=0.7, top_p=0.9, do_sample=True, repetition_penalty=1.1)
response = tokenizer.decode(output[0][inputs['input_ids'].shape[1]:], skip_special_tokens=False)
if "<|im_end|>" in response:
response = response[:response.index("<|im_end|>")]
print(response)
torch.no_grad() from explorer cycles<|im_start|>role\ncontent<|im_end|>Apache 2.0 (same as base model)