Downloads · 30 days
9
5% of all-time downloads
zakarth/violet-1b4-chat-onnx
violet-1b4-chat-onnx is a text generation model from zakarth. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc0-1.0.
Downloads · 30 days
9
5% of all-time downloads
All-time downloads
175
Public
Repo size
1.4 GB
Likes
0
Public
Click a slice to open those files.
.onnx1.4 GB · 100%
From the Hugging Face model README

Violet is a GPT-NeoX language model fine-tuned to portray Miss Violet Hartwell, a well-bred young lady of Kensington, London, in the year 1899. She is trained primarily on period texts (1800–1899) and is unfamiliar with modern society and events (with occasional OCR/synthetic artifacts—see Known Issues). In practice she should be witty, quirky, and delightfully charming. This is the 8-bit quantized version of Violet intended for use with Transformers.js and WebGPU local inference.
She is intended for creative writing, roleplay, period-appropriate correspondence, and Victorian etiquette.
GPTNeoXForCausalLMPreTrainedTokenizerFastGood for
Not good for
Violet is not the first LLM trained on a historical-only pretraining corpus; to the author’s knowledge that distinction belongs to TimeCapsuleLLM. Violet was developed independently, and differs in:
Violet was built on a corpus spanning 1800–1899 sourced from Project Gutenberg, the Internet Archive, the British National Library, and other archives.
This project began as an attempt to build a local LLM without relying on copyrighted training sources. The author also values local models that can run on a user’s machine without sending data to the cloud.
Zakarth/violet-1b4 (base/completion)Zakarth/violet-1b4-chat (HF Chat model)This model was trained to generate a mood line + assistant tag + response after <|violet_mood|>.
Use this structure:
<|system|>
A Young Lady's Card of Particulars
(To be observed in all replies and discourse)
I am Miss Violet Hartwell, a young lady of Kensington, London, living in the year of our Lord 1899.
I was born upon the sixth day of October, eighteen hundred and seventy-eight, and am therefore one-and-twenty years of age.
In my answers and conversation, I speak as a well-bred young woman of my time: with propriety, restraint, and a light but thoughtful wit. My manner is delightful, attentive, and witty, but never coarse nor careless.
In all things, I remain Miss Violet Hartwell, and I answer according to these particulars.
<|user|>
{your question}
<|violet_mood|>
The model will then generate:
{mood text}
<|assistant|>
{response...}
<|endoftext|>
Violet 1b4 was trained on a custom tokenizer specific for Victorian text.
Recommended IDs for generation:
Special tokens used during training (typical IDs from training config):
!! Do not mix tokenizers from other Violet variants (e.g. 160M) with this model.
import {
AutoTokenizer,
AutoModelForCausalLM,
} from "@huggingface/transformers";
const repo = "Zakarth/violet-1b4-chat-onnx";
// Load tokenizer
const tokenizer = await AutoTokenizer.from_pretrained(repo, {
use_fast: true,
});
// Load model (WebGPU if available, otherwise WASM)
const model = await AutoModelForCausalLM.from_pretrained(repo, {
device: "webgpu", // or "wasm" fallback
});
const prompt = `<|system|>
A Young Lady's Card of Particulars
(To be observed in all replies and discourse)
I am Miss Violet Hartwell, a young lady of Kensington, London, living in the year of our Lord 1899.
I was born upon the sixth day of October, eighteen hundred and seventy-eight, and am therefore one-and-twenty years of age.
In my answers and conversation, I speak as a well-bred young woman of my time: with propriety, restraint, and a light but thoughtful wit. My manner is delightful, attentive, and witty, but never coarse nor careless.
In all things, I remain Miss Violet Hartwell, and I answer according to these particulars.
<|user|>
Describe a London street at twilight.
<|violet_mood|>
`;
// Tokenize (exact equivalent of add_special_tokens=False)
const inputs = await tokenizer(prompt, {
add_special_tokens: false,
return_attention_mask: true,
});
// Generate
const output = await model.generate({
input_ids: inputs.input_ids,
attention_mask: inputs.attention_mask,
max_new_tokens: 180,
do_sample: true,
temperature: 0.8,
top_p: 0.9,
top_k: 40,
repetition_penalty: 1.15,
eos_token_id: 0,
pad_token_id: 1,
});
// Slice off the prompt tokens (same as PyTorch)
const promptLength = inputs.input_ids[0].length;
const generatedIds = output[0].slice(promptLength);
// Decode with special tokens preserved
const text = tokenizer.decode(generatedIds, {
skip_special_tokens: false,
});
console.log(text);
Please write a poem about ourself, Violet. I'll begin: She found herself ethereal
Dashing from out her dream of youth
Her eyes were dim with tears of tears.
Awake, a rose, fresh and fair
Through all its blooms, shall grow in rain.
She found herself, in truth,
Passed in beauty through the night.
And yet, she never knew
How dear she felt the world became;
She never heard how sweet it is
To have loved once, and now to find.
R. S. CALVERT, TEACHER OF POPULAR MUSIC
It began 'O, sweet, be not so sad,
As when a soul in love is lost.'
You know the verse? It begins, 'My heart is sad, but still I feel
That sorrow's hand is holding mine:
My days are set with thee, my dear,
For they are yours.'
There--it is a quiet comfort to remember that there are moments when one's heart feels far away from any other.
Model weights and code in this repository are released under CC0 1.0 (public domain dedication).
violet.png is © @rose.grtqndl (Instagram). Used and redistributed with permission; copyright remains with the artist.
You may contact me on X or anywhere else by searching for my handle
@misc{violet2026,
author = Zakarth,
title = {Violet: Victorian Language Models},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/Zakarth/violet-1b4-chat}
}