Violet 160M Chat (ONNX) — Miss Violet Hartwell (London, 1899)
Violet
Model Summary
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. Since this is the 160M variant of Violet, she is tiny but mighty and appropriate for mobile devices. For completions, Violet 160M is almost as good as Violet 1b4, and for chat, well... It's fun at least. If you're looking for the most powerful Violet, have a visit to Violet 1b4 Chat. This version of Violet is the int8 quantized version, for the non-quantized HF version of the model visit Violet 160M Chat.
She is intended for creative writing, roleplay, period-appropriate correspondence, and Victorian etiquette.
Architecture: GPTNeoXForCausalLM
Parameters: ~152M
Context length: 4096
Vocab size: 50281
Tokenizer: GPTNeoXTokenizer
Intended Use
Good for
Victorian-flavored conversation and letters
Descriptive prose, scene writing, etiquette Q&A
In-character responses with an almost consistent persona
Not good for
Contemporary factual Q&A
Medical/legal/financial advice
Known Issues / Limitations
The 160M model series are very brittle in chat, but are very good at text completion in general.
Will likely misgender itself or the user.
Ages and dates are unreliable (even within 1800–1899).
Because parts of the corpus were derived from OCR, occasional stray modern tokens may appear (e.g., “http”, “Google”, “Internet Archive”).
Synthetic SFT data was used to build a chat interface and enforce the structured format; for purists, the completion models may be preferable.
Training data includes UK and US English from the era.
The 160M model series did not pre-filter only English in the corpus, meaning other languages were added as part of its pretraining. These are mostly European languages, but some asian languages are represented as well.
Outputs may reflect historical biases typical of the Victorian era. Use discretion.
Notes
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:
Offers a working chat mode
A structured “mood” line as part of chat output
Built-in character design and prompt protocol
A custom Victorian-era tokenizer
Violet 160M was built on a corpus spanning 1800–1899 mostly sourced from Project Gutenberg. Consequently she has a very strong narrative presence.
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.
Both of these are intended to use WebGPU and run local on your system -- No data is sent to the cloud.
Related repos
Zakarth/violet-160m (base/completion for 160M series)
Zakarth/violet-1b4 (base/completion)
Zakarth/violet-1b4-chat-onnx (WebGPU INT8)
Prompt Format (Chat)
This model was trained to generate a mood line + assistant tag + response after <|violet_mood|>.
Use this structure:
text
1<|system|>
2A Young Lady's Card of Particulars
34(To be observed in all replies and discourse)
56I am Miss Violet Hartwell, a young lady of Kensington, London, living in the year of our Lord 1899.
7I was born upon the sixth day of October, eighteen hundred and seventy-eight, and am therefore one-and-twenty years of age.
89In 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.
1011In all things, I remain Miss Violet Hartwell, and I answer according to these particulars.
12<|user|>
13{your question}
14<|violet_mood|>
Violet 160M uses a GPT-NeoX / Pythia-style tokenizer.
Recommended IDs for generation:
eos_token_id: 0
pad_token_id: 50277
Special tokens used during training (typical IDs from training config):
<|system|>: 50277
<|user|>: 50278
<|assistant|>: 50279
<|violet_mood|>: 50280
!! Do not mix tokenizers from other Violet variants (e.g. 1.4B) with this model.
How to use (Transformers.js)
code
1import {
2 AutoTokenizer,
3 AutoModelForCausalLM,
4} from "@huggingface/transformers";
56const repo = "Zakarth/violet-1b4-chat-onnx";
78// Load tokenizer
9const tokenizer = await AutoTokenizer.from_pretrained(repo, {
10 use_fast: true,
11});
1213// Load model (WebGPU if available, otherwise WASM)
14const model = await AutoModelForCausalLM.from_pretrained(repo, {
15 device: "webgpu", // or "wasm" fallback
16});
1718const prompt = `<|system|>
19A Young Lady's Card of Particulars
2021(To be observed in all replies and discourse)
2223I am Miss Violet Hartwell, a young lady of Kensington, London, living in the year of our Lord 1899.
24I was born upon the sixth day of October, eighteen hundred and seventy-eight, and am therefore one-and-twenty years of age.
2526In 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.
2728In all things, I remain Miss Violet Hartwell, and I answer according to these particulars.
29<|user|>
30Describe a London street at twilight.
31<|violet_mood|>
32`;
3334// Tokenize (exact equivalent of add_special_tokens=False)
35const inputs = await tokenizer(prompt, {
36 add_special_tokens: false,
37 return_attention_mask: true,
38});
3940// Generate
41const output = await model.generate({
42 input_ids: inputs.input_ids,
43 attention_mask: inputs.attention_mask,
4445 max_new_tokens: 180,
46 do_sample: true,
47 temperature: 0.8,
48 top_p: 0.9,
49 top_k: 40,
50 repetition_penalty: 1.15,
5152 eos_token_id: 0,
53 pad_token_id: 1,
54});
5556// Slice off the prompt tokens (same as PyTorch)
57const promptLength = inputs.input_ids[0].length;
58const generatedIds = output[0].slice(promptLength);
5960// Decode with special tokens preserved
61const text = tokenizer.decode(generatedIds, {
62 skip_special_tokens: false,
63});
6465console.log(text);
Sample Outputs
Describe for me the smell of a flower
It is an odor of great sweetness and fragrance. The aroma is that of freshly-flowered silk, highly charged with colour and aroma. It is not so very close, but it is exceedingly like the aroma of tobacco smoke. There are no more delicate odours to be found in the garden--it has a peculiar and delicious quality. One might say it is a delicious odor, but one must always remember that perfume is a powerful and delightful fuel to build up a house.
License
Model weights and code in this repository are released under CC0 1.0 (public domain dedication).