Improve model card: complete release documentation
Browse files
README.md
CHANGED
|
@@ -3,48 +3,61 @@ language:
|
|
| 3 |
- en
|
| 4 |
- it
|
| 5 |
pipeline_tag: text-generation
|
|
|
|
| 6 |
tags:
|
| 7 |
-
-
|
| 8 |
- code
|
|
|
|
|
|
|
| 9 |
- instruct
|
| 10 |
-
-
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
-
Model path: `e:\Pindaro\PINDARO AI CODE`
|
| 17 |
|
| 18 |
-
##
|
| 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 |
-
-
|
| 30 |
-
-
|
| 31 |
-
-
|
| 32 |
-
-
|
| 33 |
-
-
|
| 34 |
-
-
|
| 35 |
-
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
- `<|noesis|>` (id `32000`)
|
| 44 |
- `<|end|>` (id `32001`)
|
| 45 |
|
| 46 |
-
Configured template:
|
| 47 |
-
|
|
|
|
| 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 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
##
|
| 75 |
-
|
| 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 |
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
|
| 129 |
```
|
| 130 |
|
| 131 |
-
##
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
-
|
| 139 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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`
|