zakarth commited on
Commit
e47858d
·
verified ·
1 Parent(s): b35c2d7

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ violet.png filter=lfs diff=lfs merge=lfs -text
NOTICE ADDED
@@ -0,0 +1 @@
 
 
1
+ violet.png is © @rose.grtqndl (Instagram). Used and redistributed with permission. Copyright remains with the artist.
README.md CHANGED
@@ -1,3 +1,186 @@
1
  ---
 
 
 
 
 
 
 
 
2
  license: cc0-1.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ library_name: transformers
5
+ tags:
6
+ - text-generation
7
+ - gpt_neox
8
+ - roleplay
9
+ - victorian
10
  license: cc0-1.0
11
  ---
12
+
13
+ # Violet 160M Chat — Miss Violet Hartwell (London, 1899)
14
+
15
+ ![Violet](./violet.png)
16
+
17
+ ## Model Summary
18
+ **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](zakarth/violet-1b4-chat).
19
+
20
+ She is intended for **creative writing**, **roleplay**, **period-appropriate correspondence**, and **Victorian etiquette**.
21
+
22
+ - Architecture: `GPTNeoXForCausalLM`
23
+ - Parameters: ~152M
24
+ - Context length: 4096
25
+ - Vocab size: 50281
26
+ - Tokenizer: `GPTNeoXTokenizer`
27
+
28
+ ## Intended Use
29
+ **Good for**
30
+ - Victorian-flavored conversation and letters
31
+ - Descriptive prose, scene writing, etiquette Q&A
32
+ - In-character responses with a consistent persona
33
+
34
+ **Not good for**
35
+ - Contemporary factual Q&A
36
+ - Medical/legal/financial advice
37
+
38
+ ## Known Issues / Limitations
39
+ - May occasionally misgender itself or the user.
40
+ - Ages and dates can be unreliable (even within 1800–1899).
41
+ - Because parts of the corpus were derived from OCR, occasional stray modern tokens may appear (e.g., “http”, “Google”, “Internet Archive”).
42
+ - Synthetic SFT data was used to build a chat interface and enforce the structured format; for purists, the completion models may be preferable.
43
+ - Training data includes UK and US English from the era.
44
+ - Outputs may reflect historical biases typical of the Victorian era. Use discretion.
45
+
46
+ ## Notes
47
+ 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:
48
+ - Offers a working chat mode
49
+ - A structured “mood” line as part of chat output
50
+ - Built-in character design and prompt protocol
51
+ - A custom Victorian-era tokenizer
52
+
53
+ Violet 160M was built on a corpus spanning 1800–1899 mostly sourced from Project Gutenberg. Consequently she has a very strong narrative presence.
54
+
55
+ 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.
56
+
57
+ ## Demo Resources
58
+ - HF Space: [Transformers.js Demo](Zakarth/violetdemo)
59
+ - CloudFlare Mirror: [Transformers.js Demo](https://pub-353f427e6227415cb077f3645638c125.r2.dev/index.html)
60
+ - Both of these are intended to use WebGPU and run local on your system -- No data is sent to the cloud.
61
+
62
+ ## Related repos
63
+ - `Zakarth/violet-160m` (base/completion for 160M series)
64
+ - `Zakarth/violet-1b4` (base/completion)
65
+ - `Zakarth/violet-1b4-chat-onnx` (WebGPU INT8)
66
+
67
+ ## Prompt Format (Chat)
68
+ This model was trained to generate **a mood line + assistant tag + response** after `<|violet_mood|>`.
69
+
70
+ Use this structure:
71
+
72
+ ```text
73
+ <|system|>
74
+ A Young Lady's Card of Particulars
75
+
76
+ (To be observed in all replies and discourse)
77
+
78
+ I am Miss Violet Hartwell, a young lady of Kensington, London, living in the year of our Lord 1899.
79
+ I was born upon the sixth day of October, eighteen hundred and seventy-eight, and am therefore one-and-twenty years of age.
80
+
81
+ 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.
82
+
83
+ In all things, I remain Miss Violet Hartwell, and I answer according to these particulars.
84
+ <|user|>
85
+ {your question}
86
+ <|violet_mood|>
87
+ ```
88
+
89
+ The model will then generate:
90
+
91
+ ```text
92
+ {mood text}
93
+ <|assistant|>
94
+ {response...}
95
+ <|endoftext|>
96
+ ```
97
+
98
+ ## Tokenization and Special Tokens
99
+ Violet 160M uses a GPT-NeoX / Pythia-style tokenizer.
100
+
101
+ Recommended IDs for generation:
102
+ * eos_token_id: 0
103
+ * pad_token_id: 50277
104
+
105
+ Special tokens used during training (typical IDs from training config):
106
+
107
+ * <|system|>: 50277
108
+ * <|user|>: 50278
109
+ * <|assistant|>: 50279
110
+ * <|violet_mood|>: 50280
111
+
112
+ !! Do not mix tokenizers from other Violet variants (e.g. 1.4B) with this model.
113
+
114
+ ## How to use (Transformers)
115
+ ```code
116
+ from transformers import AutoTokenizer, AutoModelForCausalLM
117
+ import torch
118
+
119
+ repo = "Zakarth/violet-160m-chat"
120
+ tok = AutoTokenizer.from_pretrained(repo, use_fast=True)
121
+ model = AutoModelForCausalLM.from_pretrained(repo, device_map="auto")
122
+
123
+ prompt = """<|system|>
124
+ A Young Lady's Card of Particulars
125
+
126
+ (To be observed in all replies and discourse)
127
+
128
+ I am Miss Violet Hartwell, a young lady of Kensington, London, living in the year of our Lord 1899.
129
+ I was born upon the sixth day of October, eighteen hundred and seventy-eight, and am therefore one-and-twenty years of age.
130
+
131
+ 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.
132
+
133
+ In all things, I remain Miss Violet Hartwell, and I answer according to these particulars.
134
+ <|user|>
135
+ Describe a London street at twilight.
136
+ <|violet_mood|>
137
+ """
138
+
139
+ inputs = tok(prompt, return_tensors="pt", add_special_tokens=False)
140
+ # Filter out token_type_ids if present
141
+ inputs = {k: v.to(model.device) for k, v in inputs.items() if k in ['input_ids', 'attention_mask']}
142
+
143
+ out = model.generate(
144
+ **inputs,
145
+ max_new_tokens=180,
146
+ do_sample=True,
147
+ temperature=0.8,
148
+ top_p=0.9,
149
+ top_k=40,
150
+ repetition_penalty=1.15,
151
+ eos_token_id=0,
152
+ pad_token_id=50277,
153
+ )
154
+ print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False))
155
+ ```
156
+
157
+ ## Sample Outputs
158
+
159
+ > Violet, how do you feel about London?
160
+
161
+ ```text
162
+ That is a most distressing subject. The present moment is drawing near. The very air is thick with the presence of those who had a right to know and enjoy the city. I have often wondered if it would be a comfort to stay for good, and if the air might be softer or more wholesome. It has a rather solemn aspect now.```
163
+
164
+ ## License
165
+
166
+ Model weights and code in this repository are released under CC0 1.0 (public domain dedication).
167
+
168
+ ## Artwork
169
+
170
+ violet.png is © @rose.grtqndl (Instagram). Used and redistributed with permission; copyright remains with the artist.
171
+
172
+ ## Contact
173
+
174
+ You may contact me on X or anywhere else by searching for my handle
175
+
176
+ ## Citation
177
+
178
+ ```bibtex
179
+ @misc{violet2026,
180
+ author = Zakarth,
181
+ title = {Violet: Victorian Language Models},
182
+ year = {2026},
183
+ publisher = {HuggingFace},
184
+ url = {https://huggingface.co/Zakarth/violet-1b4-chat}
185
+ }
186
+ ```
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "GPTNeoXForCausalLM"
4
+ ],
5
+ "attention_bias": true,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": 0.1,
9
+ "dtype": "bfloat16",
10
+ "eos_token_id": 0,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout": 0.0,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 4096,
18
+ "model_type": "gpt_neox",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 16,
21
+ "pad_token_id": 50277,
22
+ "partial_rotary_factor": 0.25,
23
+ "rope_scaling": null,
24
+ "rope_theta": 10000,
25
+ "rotary_emb_base": 10000,
26
+ "rotary_pct": 0.25,
27
+ "tie_word_embeddings": true,
28
+ "transformers_version": "4.57.6",
29
+ "use_cache": false,
30
+ "use_parallel_residual": true,
31
+ "vocab_size": 50281
32
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": [
5
+ 0,
6
+ 2
7
+ ],
8
+ "pad_token_id": 50277,
9
+ "transformers_version": "4.57.6"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c385f5f5a6876ab2cd20d8fea8404f04abbb633804314789e08e39cb47f2d9bd
3
+ size 304069152
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|system|>",
4
+ "<|user|>",
5
+ "<|assistant|>",
6
+ "<|violet_mood|>"
7
+ ],
8
+ "bos_token": {
9
+ "content": "<|endoftext|>",
10
+ "lstrip": false,
11
+ "normalized": false,
12
+ "rstrip": false,
13
+ "single_word": false
14
+ },
15
+ "eos_token": {
16
+ "content": "<|endoftext|>",
17
+ "lstrip": false,
18
+ "normalized": false,
19
+ "rstrip": false,
20
+ "single_word": false
21
+ },
22
+ "pad_token": "<|system|>",
23
+ "unk_token": {
24
+ "content": "<|endoftext|>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": false,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<|endoftext|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<|padding|>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "50254": {
23
+ "content": " ",
24
+ "lstrip": false,
25
+ "normalized": true,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "50255": {
31
+ "content": " ",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": false
37
+ },
38
+ "50256": {
39
+ "content": " ",
40
+ "lstrip": false,
41
+ "normalized": true,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": false
45
+ },
46
+ "50257": {
47
+ "content": " ",
48
+ "lstrip": false,
49
+ "normalized": true,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": false
53
+ },
54
+ "50258": {
55
+ "content": " ",
56
+ "lstrip": false,
57
+ "normalized": true,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "50259": {
63
+ "content": " ",
64
+ "lstrip": false,
65
+ "normalized": true,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "50260": {
71
+ "content": " ",
72
+ "lstrip": false,
73
+ "normalized": true,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": false
77
+ },
78
+ "50261": {
79
+ "content": " ",
80
+ "lstrip": false,
81
+ "normalized": true,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": false
85
+ },
86
+ "50262": {
87
+ "content": " ",
88
+ "lstrip": false,
89
+ "normalized": true,
90
+ "rstrip": false,
91
+ "single_word": false,
92
+ "special": false
93
+ },
94
+ "50263": {
95
+ "content": " ",
96
+ "lstrip": false,
97
+ "normalized": true,
98
+ "rstrip": false,
99
+ "single_word": false,
100
+ "special": false
101
+ },
102
+ "50264": {
103
+ "content": " ",
104
+ "lstrip": false,
105
+ "normalized": true,
106
+ "rstrip": false,
107
+ "single_word": false,
108
+ "special": false
109
+ },
110
+ "50265": {
111
+ "content": " ",
112
+ "lstrip": false,
113
+ "normalized": true,
114
+ "rstrip": false,
115
+ "single_word": false,
116
+ "special": false
117
+ },
118
+ "50266": {
119
+ "content": " ",
120
+ "lstrip": false,
121
+ "normalized": true,
122
+ "rstrip": false,
123
+ "single_word": false,
124
+ "special": false
125
+ },
126
+ "50267": {
127
+ "content": " ",
128
+ "lstrip": false,
129
+ "normalized": true,
130
+ "rstrip": false,
131
+ "single_word": false,
132
+ "special": false
133
+ },
134
+ "50268": {
135
+ "content": " ",
136
+ "lstrip": false,
137
+ "normalized": true,
138
+ "rstrip": false,
139
+ "single_word": false,
140
+ "special": false
141
+ },
142
+ "50269": {
143
+ "content": " ",
144
+ "lstrip": false,
145
+ "normalized": true,
146
+ "rstrip": false,
147
+ "single_word": false,
148
+ "special": false
149
+ },
150
+ "50270": {
151
+ "content": " ",
152
+ "lstrip": false,
153
+ "normalized": true,
154
+ "rstrip": false,
155
+ "single_word": false,
156
+ "special": false
157
+ },
158
+ "50271": {
159
+ "content": " ",
160
+ "lstrip": false,
161
+ "normalized": true,
162
+ "rstrip": false,
163
+ "single_word": false,
164
+ "special": false
165
+ },
166
+ "50272": {
167
+ "content": " ",
168
+ "lstrip": false,
169
+ "normalized": true,
170
+ "rstrip": false,
171
+ "single_word": false,
172
+ "special": false
173
+ },
174
+ "50273": {
175
+ "content": " ",
176
+ "lstrip": false,
177
+ "normalized": true,
178
+ "rstrip": false,
179
+ "single_word": false,
180
+ "special": false
181
+ },
182
+ "50274": {
183
+ "content": " ",
184
+ "lstrip": false,
185
+ "normalized": true,
186
+ "rstrip": false,
187
+ "single_word": false,
188
+ "special": false
189
+ },
190
+ "50275": {
191
+ "content": " ",
192
+ "lstrip": false,
193
+ "normalized": true,
194
+ "rstrip": false,
195
+ "single_word": false,
196
+ "special": false
197
+ },
198
+ "50276": {
199
+ "content": " ",
200
+ "lstrip": false,
201
+ "normalized": true,
202
+ "rstrip": false,
203
+ "single_word": false,
204
+ "special": false
205
+ },
206
+ "50277": {
207
+ "content": "<|system|>",
208
+ "lstrip": false,
209
+ "normalized": false,
210
+ "rstrip": false,
211
+ "single_word": false,
212
+ "special": true
213
+ },
214
+ "50278": {
215
+ "content": "<|user|>",
216
+ "lstrip": false,
217
+ "normalized": false,
218
+ "rstrip": false,
219
+ "single_word": false,
220
+ "special": true
221
+ },
222
+ "50279": {
223
+ "content": "<|assistant|>",
224
+ "lstrip": false,
225
+ "normalized": false,
226
+ "rstrip": false,
227
+ "single_word": false,
228
+ "special": true
229
+ },
230
+ "50280": {
231
+ "content": "<|violet_mood|>",
232
+ "lstrip": false,
233
+ "normalized": false,
234
+ "rstrip": false,
235
+ "single_word": false,
236
+ "special": true
237
+ }
238
+ },
239
+ "additional_special_tokens": [
240
+ "<|system|>",
241
+ "<|user|>",
242
+ "<|assistant|>",
243
+ "<|violet_mood|>"
244
+ ],
245
+ "bos_token": "<|endoftext|>",
246
+ "clean_up_tokenization_spaces": false,
247
+ "eos_token": "<|endoftext|>",
248
+ "extra_special_tokens": {},
249
+ "model_max_length": 1000000000000000019884624838656,
250
+ "pad_token": "<|system|>",
251
+ "tokenizer_class": "GPTNeoXTokenizer",
252
+ "unk_token": "<|endoftext|>"
253
+ }
violet.png ADDED

Git LFS Details

  • SHA256: 9a1d7d864791b3965d1f16c3358e92d294582fc2a35ef7af3b5605455016cb61
  • Pointer size: 131 Bytes
  • Size of remote file: 153 kB