RthItalia commited on
Commit
f1932cf
·
verified ·
1 Parent(s): b71b891

Improve model card: complete release documentation

Browse files
Files changed (1) hide show
  1. README.md +123 -90
README.md CHANGED
@@ -3,48 +3,61 @@ language:
3
  - en
4
  - it
5
  pipeline_tag: text-generation
 
6
  tags:
7
- - gguf
8
  - code
 
 
9
  - instruct
10
- - llama
11
  ---
12
 
13
- # MODEL_CARD - PINDARO AI CODE
14
 
15
- Date: 2026-03-02
16
- Model path: `e:\Pindaro\PINDARO AI CODE`
17
 
18
- ## 1. Model Identity
19
- - Name: `PINDARO AI CODE`
20
- - Family: LLaMA-style causal LM
21
- - Intended role: coding assistant
22
- - Format support:
23
- - Hugging Face (`model.safetensors`)
24
- - GGUF F16 (`pindaro-f16.gguf`)
25
- - GGUF Q4_K_M (`pindaro-q4_k_m.gguf`)
26
 
27
- ## 2. Technical Specs
28
  - Architecture: `LlamaForCausalLM`
29
- - `model_type`: `llama`
30
- - Layers: `22`
31
- - Hidden size: `2048`
32
- - Attention heads: `32`
33
- - KV heads: `4`
34
- - Intermediate size: `5632`
35
- - Max context: `2048`
36
- - Vocab size: `32002`
37
- - Tensor count in safetensors: `201`
38
- - Parameter count (computed): `1,100,056,576`
39
- - Dtype in config: `float16`
40
-
41
- ## 3. Chat / Prompt Format
42
- Template is aligned to registered special tokens:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  - `<|noesis|>` (id `32000`)
44
  - `<|end|>` (id `32001`)
45
 
46
- Configured template:
47
- ````jinja
 
48
  {{ bos_token }}{% for message in messages %}<|noesis|>
49
  {% if message['role'] == 'system' %}### System
50
  {{ message['content'] }}
@@ -57,61 +70,33 @@ Configured template:
57
  ### Answer
58
  ```
59
  {% endif %}
60
- ````
61
-
62
- ## 4. Local Artifact Integrity (SHA256)
63
- - `model.safetensors`: `F77C27B8BABF9FCAB83A7DC68BA58934E8C8C031C9F10B4B73E802D4FBFE0CEC`
64
- - `config.json`: `B37C45060F3E2F5F9B91903C9CCB32F3C21076E809954FDA6C01D987CD8F25CC`
65
- - `generation_config.json`: `6FF47E725C0EC6D0F1895670DE7EE68E61A4F99703F6C8E89AEA6AB14EA02DC3`
66
- - `tokenizer.json`: `51433F06369AC3E597DFA23A811215E3511B8F86588A830DED72344B76A193EE`
67
- - `tokenizer_config.json`: `A0567C49A117AF9AF332874CFD333DDD622A09C5E9765131CEEE6344CB22A3DE`
68
- - `tokenizer.model`: `9E556AFD44213B6BD1BE2B850EBBBD98F5481437A8021AFAF58EE7FB1818D347`
69
- - `special_tokens_map.json`: `D7805E093432AFCDE852968CDEBA3DE08A6FE66E77609F4701DECB87FC492F33`
70
- - `added_tokens.json`: `ECE349D292E246EAC9A9072C1730F023E61567984A828FB0D25DCCB14E3B7592`
71
- - `pindaro-f16.gguf`: `BDAAEB6FB712E9A4D952082CF415B05C7D076B33786D39063BBFB3A7E5DB2031`
72
- - `pindaro-q4_k_m.gguf`: `5F98CC3454774ED5ED80D71A71ADFD0DAFF760FC9EEF0900DDD4F7EDA2E20FEF`
73
-
74
- ## 5. Smoke Tests (2026-03-02)
75
- Environment:
76
- - Python `3.11.9`
77
- - Transformers `4.57.3`
78
- - Torch `2.10.0+cpu`
79
-
80
- Results:
81
- - AutoConfig load: PASS
82
- - AutoTokenizer load: PASS
83
- - AutoModel load: PASS
84
- - Chat-template render: PASS
85
- - Template special-token alignment: PASS
86
- - Deterministic generation: PASS
87
-
88
- Observed non-blocking warning:
89
- - Folder name with spaces may trigger a Python module-name warning in some runtimes.
90
-
91
- ## 6. Known Issues
92
- 1. Folder-name warning risk
93
- - `PINDARO AI CODE` has spaces; some tools warn on module naming.
94
-
95
- 2. Attention-mask warning in some calls
96
- - As `pad_token` equals `eos_token`, pass `attention_mask` explicitly for stable behavior.
97
-
98
- ## 7. Recommended Next Steps
99
- 1. Optional packaging cleanup
100
- - Rename folder to a no-space slug (example: `PINDARO_AI_CODE`) when compatible with your deployment scripts.
101
-
102
- 2. Add coding eval gate
103
- - HumanEval pass@1
104
- - MBPP subset
105
- - Prompt-format adherence checks
106
-
107
- ## 8. Usage Example
108
  ```python
109
  import torch
110
  from transformers import AutoTokenizer, AutoModelForCausalLM
111
 
112
- path = r"e:\Pindaro\PINDARO AI CODE"
113
- tokenizer = AutoTokenizer.from_pretrained(path, local_files_only=True)
114
- model = AutoModelForCausalLM.from_pretrained(path, local_files_only=True, dtype=torch.float16)
 
 
 
 
115
 
116
  messages = [
117
  {"role": "system", "content": "You are a coding assistant."},
@@ -124,16 +109,64 @@ inputs = tokenizer.apply_chat_template(
124
  add_generation_prompt=True,
125
  return_tensors="pt",
126
  )
127
- outputs = model.generate(inputs, max_new_tokens=80, do_sample=False)
 
 
 
 
 
 
 
 
128
  print(tokenizer.decode(outputs[0], skip_special_tokens=False))
129
  ```
130
 
131
- ## 9. Limitations and Safety
132
- - No training-data statement is included in this folder.
133
- - No official benchmark sheet is included.
134
- - Code generation can be plausible but wrong; always run tests.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
- ## 10. Release Readiness
137
- Current status: READY FOR LOCAL USE.
138
- - Packaging/runtime blockers are resolved.
139
- - Remaining items are evaluation and packaging polish.
 
 
 
 
 
 
 
3
  - en
4
  - it
5
  pipeline_tag: text-generation
6
+ library_name: transformers
7
  tags:
8
+ - llama
9
  - code
10
+ - coding-assistant
11
+ - gguf
12
  - instruct
13
+ - 1b
14
  ---
15
 
16
+ # PINDARO AI CODE
17
 
18
+ PINDARO AI CODE is the code-specialized release of the Pindaro model family.
 
19
 
20
+ ## Model At A Glance
 
 
 
 
 
 
 
21
 
 
22
  - Architecture: `LlamaForCausalLM`
23
+ - Model type: `llama`
24
+ - Approx. parameters: **~1.1B**
25
+ - Precision: `float16`
26
+ - Context length: `2048`
27
+ - Vocabulary size: `32002`
28
+ - Languages: English, Italian
29
+ - Primary use: code generation and coding assistance
30
+
31
+ ## Included Artifacts
32
+
33
+ Hugging Face format:
34
+ - `model.safetensors`
35
+ - `config.json`
36
+ - `generation_config.json`
37
+ - `tokenizer.json`
38
+ - `tokenizer.model`
39
+ - `tokenizer_config.json`
40
+ - `special_tokens_map.json`
41
+ - `added_tokens.json`
42
+
43
+ GGUF format:
44
+ - `pindaro-f16.gguf`
45
+ - `pindaro-q4_k_m.gguf`
46
+
47
+ Release docs:
48
+ - `release/RELEASE_MANIFEST.json`
49
+ - `release/RELEASE_NOTES.md`
50
+ - `release/SHA256SUMS.txt`
51
+
52
+ ## Prompt Format
53
+
54
+ Special tokens:
55
  - `<|noesis|>` (id `32000`)
56
  - `<|end|>` (id `32001`)
57
 
58
+ Configured chat template uses role sections and appends a code-fence prefix in generation prompt:
59
+
60
+ ```jinja
61
  {{ bos_token }}{% for message in messages %}<|noesis|>
62
  {% if message['role'] == 'system' %}### System
63
  {{ message['content'] }}
 
70
  ### Answer
71
  ```
72
  {% endif %}
73
+ ```
74
+
75
+ Minimal manual prompt example:
76
+
77
+ ```text
78
+ <|noesis|>
79
+ ### Question
80
+ Write a Python function add(a, b).
81
+ <|end|>
82
+ <|noesis|>
83
+ ### Answer
84
+ ```
85
+ ```
86
+
87
+ ## Quickstart (Transformers)
88
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  ```python
90
  import torch
91
  from transformers import AutoTokenizer, AutoModelForCausalLM
92
 
93
+ model_id = "RthItalia/PINDARO-AI-CODE"
94
+
95
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
96
+ model = AutoModelForCausalLM.from_pretrained(
97
+ model_id,
98
+ torch_dtype=torch.float16,
99
+ )
100
 
101
  messages = [
102
  {"role": "system", "content": "You are a coding assistant."},
 
109
  add_generation_prompt=True,
110
  return_tensors="pt",
111
  )
112
+
113
+ attention_mask = torch.ones_like(inputs)
114
+ outputs = model.generate(
115
+ inputs,
116
+ attention_mask=attention_mask,
117
+ max_new_tokens=120,
118
+ do_sample=False,
119
+ )
120
+
121
  print(tokenizer.decode(outputs[0], skip_special_tokens=False))
122
  ```
123
 
124
+ ## Quickstart (GGUF / llama.cpp)
125
+
126
+ ```bash
127
+ ./llama-cli -m pindaro-q4_k_m.gguf -p "<|noesis|>
128
+ ### Question
129
+ Write a Python function add(a, b).
130
+ <|end|>
131
+ <|noesis|>
132
+ ### Answer
133
+ ```" -n 120
134
+ ```
135
+
136
+ ## Validation Snapshot
137
+
138
+ Last internal validation snapshot: **2026-03-02**
139
+
140
+ - HF smoke tests: PASS
141
+ - HF mini-eval coding quality: **1.00**
142
+ - GGUF F16 quality gate: PASS
143
+ - GGUF Q4_K_M quality gate: PASS
144
+ - Release verdict: **publishable: true**
145
+
146
+ Notes:
147
+ - Results are from internal sanity checks, not a full public benchmark suite.
148
+
149
+ ## Known Limitations
150
+
151
+ - Generated code can be syntactically correct but logically wrong.
152
+ - May emit verbose outputs or repeated scaffolding.
153
+ - Always run tests and static checks on generated code.
154
+
155
+ ## Safety
156
+
157
+ - Do not execute generated code in privileged environments without review.
158
+ - Use sandboxing for untrusted snippets.
159
+ - Add dependency and secret scanning in deployment workflows.
160
+
161
+ ## Artifact Checksums (SHA256)
162
 
163
+ - `model.safetensors`: `f77c27b8babf9fcab83a7dc68ba58934e8c8c031c9f10b4b73e802d4fbfe0cec`
164
+ - `config.json`: `b37c45060f3e2f5f9b91903c9ccb32f3c21076e809954fda6c01d987cd8f25cc`
165
+ - `generation_config.json`: `6ff47e725c0ec6d0f1895670de7ee68e61a4f99703f6c8e89aea6ab14ea02dc3`
166
+ - `tokenizer.json`: `51433f06369ac3e597dfa23a811215e3511b8f86588a830ded72344b76a193ee`
167
+ - `tokenizer.model`: `9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347`
168
+ - `tokenizer_config.json`: `a0567c49a117af9af332874cfd333ddd622a09c5e9765131ceee6344cb22a3de`
169
+ - `special_tokens_map.json`: `d7805e093432afcde852968cdeba3de08a6fe66e77609f4701decb87fc492f33`
170
+ - `added_tokens.json`: `ece349d292e246eac9a9072c1730f023e61567984a828fb0d25dccb14e3b7592`
171
+ - `pindaro-f16.gguf`: `bdaaeb6fb712e9a4d952082cf415b05c7d076b33786d39063bbfb3a7e5db2031`
172
+ - `pindaro-q4_k_m.gguf`: `5f98cc3454774ed5ed80d71a71adfd0daff760fc9eef0900ddd4f7eda2e20fef`