hermitlm-8M

A ~8M parameter causal transformer that talks like a tiny crab in an aquatic world.

Architecture: 6 layers, hidden dim 320, 8 heads, SwiGLU FFN 800, learned positions, LayerNorm, weight-tied LM head. Vocab 2831 BPE, max sequence 512. See config.json.

Training: SFT on data/train.jsonl, then PPO against a persona reward and a DPO stage. Eval on 10 held-out prompts: SFT persona 0.516, PPO 0.648, DPO 0.449. Perplexity ~1.93.

Files

  • best_model.pt: PyTorch checkpoint (model_state_dict + config)
  • config.json: model and training config
  • tokenizer.json: byte-level BPE tokenizer
  • model.onnx: full-precision ONNX export for the browser UI
  • model.quant.onnx: uint8 quantized ONNX (~9MB)
  • decision_probe.pt: 7-way intent probe on frozen features
  • decision_tool_probe.pt: 4-way tool-routing probe (math/web/faq/chat)

Use

from huggingface_hub import snapshot_download
from tokenizers import Tokenizer
import torch
from hermitlm.training.model import HermitLM
from hermitlm.config import HermitConfig

repo = snapshot_download("darshi1337/hermitlm-8M")
ckpt = torch.load(f"{repo}/best_model.pt", map_location="cpu", weights_only=True)
config = HermitConfig(**ckpt["config"])
model = HermitLM(config)
model.load_state_dict(ckpt["model_state_dict"])
tokenizer = Tokenizer.from_file(f"{repo}/tokenizer.json")

Browser chat uses model.quant.onnx with fallback to model.onnx.

Downloads last month
17
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support