29 lines
812 B
Markdown
29 lines
812 B
Markdown
|
|
---
|
||
|
|
license: other
|
||
|
|
library_name: transformers
|
||
|
|
base_model: Qwen/Qwen2.5-14B-Instruct
|
||
|
|
tags:
|
||
|
|
- nanollm
|
||
|
|
- qwen2.5
|
||
|
|
- safetensors
|
||
|
|
- text-generation
|
||
|
|
---
|
||
|
|
|
||
|
|
# NanoLLM Qwen2.5-14B-Instruct v3.1
|
||
|
|
|
||
|
|
Compact self-contained NanoLLM format is in `nano_compact/`.
|
||
|
|
|
||
|
|
```python
|
||
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||
|
|
repo_id = "RthItalia/NanoLLM-Qwen2.5-14B-v3.1"
|
||
|
|
tokenizer = AutoTokenizer.from_pretrained(repo_id, subfolder="nano_compact", use_fast=True)
|
||
|
|
model = AutoModelForCausalLM.from_pretrained(repo_id, subfolder="nano_compact", trust_remote_code=True, device_map="auto")
|
||
|
|
```
|
||
|
|
|
||
|
|
Validation against 8-bit reference:
|
||
|
|
- avg cosine: 0.98984375
|
||
|
|
- min cosine: 0.9765625
|
||
|
|
- gate: avg >= 0.985
|
||
|
|
|
||
|
|
`nano_compact/model.safetensors` contains Nano quantized tensors and does not require downloading the Qwen base weights.
|