Downloads · 30 days
50
82% of all-time downloads
Nanite-Labs/nanites-medieval-e2b-chat
nanites-medieval-e2b-chat is a text generation model from Nanite-Labs. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Downloads · 30 days
50
82% of all-time downloads
All-time downloads
61
Public
Parameters
4.6B
9.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors9.4 GB · 100%
From the Hugging Face model README

A Gemma-4-E2B model fine-tuned to speak as a literate person of late-medieval England — a 15th-century letter-writer — drawn from real pre-1500 letters and papers. You address it as a modern visitor; it answers in a modernized but period register.
Ask it like a visitor asking a 1400s gentleman about the harvest, the wool market, a lawsuit, the war in France, or a daughter's marriage. It answers in 1-3 sentences with period vocabulary — "woe worth the weather", "thou", "hath", "groat", "staple", "good cousin" — never verbatim Middle English.
visitor> How fares your household this season?
manuscript> I thank you, the household is whole and my wife hath borne
the long winter well, though the roofs of the great hall leak
and I must send the carpenter before harvest.
visitor> What news of the war in France?
manuscript> Letters say the garrison at Calais is lean and the king
demands a subsidy to pay it. Money is the sinew of war, and the
Exchequer is dry.
visitor> My neighbour hedges in the common.
manuscript> Hue and cry upon him at the manor court, and bring the
old men that remember the true bounds. Such inclosure without
licence be a felony against the commons.
Multi-turn works — the correspondent sees your prior exchanges in context (Gemma chat template).
use_cache=True for inference (required for E2B/E4B KV-shared layers)LoraConfig), custom
trainer loop (unsloth's get_peft_model is unsupported for this arch)embed_tokens_per_layer, 262144 x 8960)
put the base at ~6.6 GB GPU; they are kept frozen on CPU with a
patched embedding forward (lm_head untied onto GPU) so real-length
sequences fit. Validated peaks: ~6.5 GB at training, ~6.5 GB inference.Gemma-4 chat template (non-thinking). Use the chat REPL in the source
repo (python -m experts.medieval.chat) which applies the template
and trims generation. Load the base as a 4-bit bf16 model with
AutoModelForCausalLM.from_pretrained(base, device_map={"":0}, dtype=torch.bfloat16), apply the freezing-embedding-offload patch from
experts/medieval/train.py, wrap with PeftModel.from_pretrained(..., "Nanite-Labs/nanites-medieval-e2b-chat"), and generate with
use_cache=True.
Training corpus (data/parsed/corpus.jsonl, 4,172 entries / ~4.3 MB):
experts.medieval.acquire + experts.medieval.parse.The ~200 distilled Q&A pairs were produced by two local teachers — laguna-xs-2.1 and ornith (neither devstral nor nemotron, the earlier experts' teachers) — prompted with parsed letter/verse excerpts. The 50 seed pairs and multi-turn conversations were written by hand as a style anchor.
Code & model: Apache 2.0. Training data: not redistributed; users can
re-scrape via experts.medieval.acquire.