plasmova commited on
Commit
e4a9310
·
verified ·
1 Parent(s): 5ea1c51

Normalize model card metadata and document GGUF in place

Browse files
Files changed (1) hide show
  1. README.md +102 -102
README.md CHANGED
@@ -1,102 +1,102 @@
1
- ---
2
- library_name: transformers
3
- license: apache-2.0
4
- pipeline_tag: text-generation
5
- tags:
6
- - custom-code
7
- - nova
8
- ---
9
-
10
- # Nova v3
11
-
12
- Nova v3 is a decoder-only causal language model with **148.8 million parameters**. This repository provides the Transformers checkpoint, tokenizer, and custom model code required to load the model.
13
-
14
- ## Model specifications
15
-
16
- | Specification | Value |
17
- |---|---:|
18
- | Parameters | 148.8M |
19
- | Vocabulary | 32,768 tokens |
20
- | Hidden size | 640 |
21
- | Transformer layers | 26 |
22
- | Attention | 10 query heads, 5 key/value heads |
23
- | Maximum context | 2,048 tokens |
24
- | Checkpoint step | 3,500 |
25
-
26
- The model supports key/value caching during generation. Its custom implementation supports Transformers 4.57 and 5.x. Review the custom modeling files before loading with `trust_remote_code=True`.
27
-
28
- ## Load with Transformers
29
-
30
- Install PyTorch and Transformers:
31
-
32
- ```bash
33
- pip install torch transformers
34
- ```
35
-
36
- Load the tokenizer and model:
37
-
38
- ```python
39
- from transformers import AutoModelForCausalLM, AutoTokenizer
40
-
41
- model_id = "plasmova/nova-v3"
42
- tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
43
- model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
44
-
45
- system_prompt = (
46
- "You are Nova, a helpful and accurate assistant. Answer the user's request directly and concisely. "
47
- "For simple arithmetic, calculate the result and state it plainly. Do not invent names, scenarios, or equations."
48
- )
49
- prompt = (
50
- f"<|system|>{system_prompt}<|/system|>"
51
- "<|user|>Explain why the sky appears blue in one sentence.<|/user|>"
52
- "<|assistant|>"
53
- )
54
- inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
55
- output = model.generate(
56
- **inputs,
57
- max_new_tokens=160,
58
- do_sample=True,
59
- temperature=0.2,
60
- top_p=0.85,
61
- top_k=12,
62
- repetition_penalty=1.12,
63
- no_repeat_ngram_size=3,
64
- eos_token_id=[
65
- tokenizer.eos_token_id,
66
- tokenizer.convert_tokens_to_ids("<|/assistant|>"),
67
- ],
68
- )
69
- print(tokenizer.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
70
- ```
71
-
72
- Recommended starting settings are temperature **0.2**, top-p **0.9**, top-k **40**, and repetition penalty **1.08**. These focused settings are a starting point; adjust them for your task. The local inference script applies this concise system instruction by default. Recommended generation defaults are temperature **0.2**, top-p **0.85**, top-k **12**, repetition penalty **1.12**, no-repeat n-gram size **3**, and up to **160 new tokens**. Keep the total prompt and generated text within the 2,048-token context. The example runs on CPU; for GPU inference, move the model and inputs to a supported device and dtype.
73
-
74
- ## Evaluation
75
-
76
- The following zero-shot results use the first 500 examples from each task with `lm-evaluation-harness` 0.4.13 on CPU. These are limited samples, not full validation-set results.
77
-
78
- | Benchmark | Samples | Accuracy | Normalized accuracy |
79
- |---|---:|---:|---:|
80
- | HellaSwag | 500 | 37.4% | 43.6% |
81
- | ARC Easy | 500 | 51.0% | 48.2% |
82
- | ARC Challenge | 500 | 21.8% | 25.0% |
83
- | WinoGrande | 500 | 52.6% | 52.2% |
84
- | OpenBookQA | 500 | 18.8% | 30.0% |
85
-
86
- ### Comparison with SmolLM2-135M
87
-
88
- In a matched zero-shot run using 500 examples per task, Nova v3 scored 43.6% normalized accuracy on HellaSwag and 52.2% on WinoGrande, compared with 44.2% and 50.6% for SmolLM2-135M. The WinoGrande difference is small relative to sampling uncertainty; treat both results as early directional measurements, not established performance claims. The comparison details and per-run metrics are in [benchmark_comparison.json](benchmark_comparison.json).
89
-
90
- On a separate 100-question GSM8K sample with five examples in context, Nova v3 and SmolLM2-135M-Instruct each answered 4 questions correctly (4.0% exact match). This small sample does not establish equivalence. Details are in [gsm8k_comparison.json](gsm8k_comparison.json).
91
-
92
- ## Training and license
93
-
94
- The v3 training code specifies pretraining on a mixture of FineWeb-Edu, DCLM, Cosmopedia-v2, FineMath, Wikipedia, and CodeParrot, followed by SmolTalk fine-tuning. Dataset contents remain subject to their respective upstream terms.
95
-
96
- The model weights and accompanying custom model code are released under the Apache License 2.0. See [LICENSE](LICENSE).
97
-
98
- ## llama.cpp and mobile apps
99
-
100
- The validated F16 GGUF export is [`nova-v3-f16.gguf`](https://huggingface.co/plasmova/nova-v3/blob/main/nova-v3-f16.gguf) (about 341 MB). It uses the `qwen3` GGUF architecture metadata needed for Nova v3's per-head query/key normalization. It was checked with llama.cpp b8882, including the version pinned by Pocket AI Lab; all 289 tensors load and CPU generation completes.
101
-
102
- In Pocket AI Lab, import `plasmova/nova-v3` and select `nova-v3-f16.gguf`. If you downloaded the previous incompatible file, remove that local copy and download this updated file.
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - custom-code
7
+ - nova
8
+ ---
9
+
10
+ # Nova v3
11
+
12
+ Nova v3 is a decoder-only causal language model with **148.8 million parameters**. This repository provides the Transformers checkpoint, tokenizer, and custom model code required to load the model.
13
+
14
+ ## Model specifications
15
+
16
+ | Specification | Value |
17
+ |---|---:|
18
+ | Parameters | 148.8M |
19
+ | Vocabulary | 32,768 tokens |
20
+ | Hidden size | 640 |
21
+ | Transformer layers | 26 |
22
+ | Attention | 10 query heads, 5 key/value heads |
23
+ | Maximum context | 2,048 tokens |
24
+ | Checkpoint step | 3,500 |
25
+
26
+ The model supports key/value caching during generation. Its custom implementation supports Transformers 4.57 and 5.x. Review the custom modeling files before loading with `trust_remote_code=True`.
27
+
28
+ ## Load with Transformers
29
+
30
+ Install PyTorch and Transformers:
31
+
32
+ ```bash
33
+ pip install torch transformers
34
+ ```
35
+
36
+ Load the tokenizer and model:
37
+
38
+ ```python
39
+ from transformers import AutoModelForCausalLM, AutoTokenizer
40
+
41
+ model_id = "plasmova/nova-v3"
42
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
43
+ model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
44
+
45
+ system_prompt = (
46
+ "You are Nova, a helpful and accurate assistant. Answer the user's request directly and concisely. "
47
+ "For simple arithmetic, calculate the result and state it plainly. Do not invent names, scenarios, or equations."
48
+ )
49
+ prompt = (
50
+ f"<|system|>{system_prompt}<|/system|>"
51
+ "<|user|>Explain why the sky appears blue in one sentence.<|/user|>"
52
+ "<|assistant|>"
53
+ )
54
+ inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
55
+ output = model.generate(
56
+ **inputs,
57
+ max_new_tokens=160,
58
+ do_sample=True,
59
+ temperature=0.2,
60
+ top_p=0.85,
61
+ top_k=12,
62
+ repetition_penalty=1.12,
63
+ no_repeat_ngram_size=3,
64
+ eos_token_id=[
65
+ tokenizer.eos_token_id,
66
+ tokenizer.convert_tokens_to_ids("<|/assistant|>"),
67
+ ],
68
+ )
69
+ print(tokenizer.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
70
+ ```
71
+
72
+ Recommended starting settings are temperature **0.2**, top-p **0.9**, top-k **40**, and repetition penalty **1.08**. These focused settings are a starting point; adjust them for your task. The local inference script applies this concise system instruction by default. Recommended generation defaults are temperature **0.2**, top-p **0.85**, top-k **12**, repetition penalty **1.12**, no-repeat n-gram size **3**, and up to **160 new tokens**. Keep the total prompt and generated text within the 2,048-token context. The example runs on CPU; for GPU inference, move the model and inputs to a supported device and dtype.
73
+
74
+ ## Evaluation
75
+
76
+ The following zero-shot results use the first 500 examples from each task with `lm-evaluation-harness` 0.4.13 on CPU. These are limited samples, not full validation-set results.
77
+
78
+ | Benchmark | Samples | Accuracy | Normalized accuracy |
79
+ |---|---:|---:|---:|
80
+ | HellaSwag | 500 | 37.4% | 43.6% |
81
+ | ARC Easy | 500 | 51.0% | 48.2% |
82
+ | ARC Challenge | 500 | 21.8% | 25.0% |
83
+ | WinoGrande | 500 | 52.6% | 52.2% |
84
+ | OpenBookQA | 500 | 18.8% | 30.0% |
85
+
86
+ ### Comparison with SmolLM2-135M
87
+
88
+ In a matched zero-shot run using 500 examples per task, Nova v3 scored 43.6% normalized accuracy on HellaSwag and 52.2% on WinoGrande, compared with 44.2% and 50.6% for SmolLM2-135M. The WinoGrande difference is small relative to sampling uncertainty; treat both results as early directional measurements, not established performance claims. The comparison details and per-run metrics are in [benchmark_comparison.json](benchmark_comparison.json).
89
+
90
+ On a separate 100-question GSM8K sample with five examples in context, Nova v3 and SmolLM2-135M-Instruct each answered 4 questions correctly (4.0% exact match). This small sample does not establish equivalence. Details are in [gsm8k_comparison.json](gsm8k_comparison.json).
91
+
92
+ ## Training and license
93
+
94
+ The v3 training code specifies pretraining on a mixture of FineWeb-Edu, DCLM, Cosmopedia-v2, FineMath, Wikipedia, and CodeParrot, followed by SmolTalk fine-tuning. Dataset contents remain subject to their respective upstream terms.
95
+
96
+ The model weights and accompanying custom model code are released under the Apache License 2.0. See [LICENSE](LICENSE).
97
+
98
+ ## llama.cpp and mobile apps
99
+
100
+ The validated F16 GGUF export is [`nova-v3-f16.gguf`](https://huggingface.co/plasmova/nova-v3/blob/main/nova-v3-f16.gguf) (about 341 MB). It uses the `qwen3` GGUF architecture metadata needed for Nova v3's per-head query/key normalization. It was checked with llama.cpp b8882, including the version pinned by Pocket AI Lab; all 289 tensors load and CPU generation completes.
101
+
102
+ In Pocket AI Lab, import `plasmova/nova-v3` and select `nova-v3-f16.gguf`. If you downloaded the previous incompatible file, remove that local copy and download this updated file.