Simplify model card for readers
Browse files
README.md
CHANGED
|
@@ -32,31 +32,27 @@ tags:
|
|
| 32 |
|
| 33 |
# Alloy 312M 2K
|
| 34 |
|
| 35 |
-
Alloy is an experimental 311.9M-parameter English causal language model with a 2,048-token context window. It is a base model, not an instruction-following assistant.
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
Alloy is a starter project for training your own language model on accessible hardware. Its 312M-parameter, 2K-context stage was trained and evaluated locally on an **NVIDIA RTX 3060 Ti with 8 GB VRAM**.
|
| 40 |
-
|
| 41 |
-
It shows a complete small-model workflow: prepare data, resume training, track validation, evaluate the result, and publish it. It is for learning and experimentation, not for matching models trained on large GPU clusters.
|
| 42 |
|
| 43 |
-
##
|
| 44 |
|
| 45 |
-
|
| 46 |
|
| 47 |
-
|
| 48 |
-
2. **Lead / Alloy**: a 2B-token continuation used a pinned public-source mix: FineWeb-Edu (`CC-MAIN-2025-26`), English Wikipedia (`20231101.en`), and TinyStories. FineWeb-Edu documents had upstream quality score >= 3; all sources then passed English-probability, Unicode/corruption, boilerplate, URL/fragment, and repeated-text filters. Source-shard holdouts separated training from validation and test. Line breaks were deliberately preserved.
|
| 49 |
-
3. The completed Alloy checkpoint was selected by its independent matching validation split, then evaluated zero-shot without prompt tuning.
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
| 52 |
|
| 53 |
## Evaluation
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
| Task | Bronze | Silver | Gold | Alloy |
|
| 58 |
| --- | ---: | ---: | ---: | ---: |
|
| 59 |
-
| Best
|
| 60 |
| ARC-Easy | 42.93% | 47.98% | 49.75% | **49.92%** |
|
| 61 |
| ARC-Challenge | 18.77% | 21.25% | 20.99% | **21.42%** |
|
| 62 |
| HellaSwag | 27.39% | 27.95% | 28.63% | **29.87%** |
|
|
@@ -64,25 +60,21 @@ Full zero-shot evaluation used `lm-evaluation-harness` 0.4.13, batch size 1, no
|
|
| 64 |
| SciQ | 64.70% | 68.80% | 69.50% | **71.90%** |
|
| 65 |
| WinoGrande | 50.36% | 49.41% | 49.64% | **50.67%** |
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
These scores show clear progress over the project’s earlier checkpoints, but they do not make Alloy competitive with mature, heavily trained public models of a similar parameter count. Benchmark contamination and harness-version differences remain possible; do not compare scores across protocols as exact leaderboard rankings.
|
| 70 |
|
| 71 |
## Use
|
| 72 |
|
| 73 |
-
This repository is a native safetensors export rather than a Transformers `AutoModel` package. It includes the minimal `tiny_english` inference module.
|
| 74 |
-
|
| 75 |
```bash
|
| 76 |
pip install -r requirements.txt
|
| 77 |
python -m tiny_english.generate --model-dir . --device cuda --prompt "The invention of the printing press changed" --max-new-tokens 128 --temperature 0.7 --top-k 40 --seed 42
|
| 78 |
```
|
| 79 |
|
| 80 |
-
Generation can repeat phrases, make factual errors, or produce incoherent continuations.
|
| 81 |
|
| 82 |
-
##
|
| 83 |
|
| 84 |
-
|
| 85 |
|
| 86 |
-
##
|
| 87 |
|
| 88 |
-
|
|
|
|
| 32 |
|
| 33 |
# Alloy 312M 2K
|
| 34 |
|
| 35 |
+
Alloy is an experimental 311.9M-parameter English causal language model with a 2,048-token context window. It is a base model for completing English text, not an instruction-following assistant. It was trained from scratch on **5.0B tokens**.
|
| 36 |
|
| 37 |
+
Try it in the free [Alloy 312M Demo](https://huggingface.co/spaces/helloboy91/alloy-312m-demo).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
+
## Train a model on a normal PC
|
| 40 |
|
| 41 |
+
Alloy is a starter project for training a language model on accessible hardware. Its 312M-parameter, 2K-context model was trained and evaluated on an **NVIDIA RTX 3060 Ti with 8 GB VRAM**.
|
| 42 |
|
| 43 |
+
## Training and data
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
- Architecture: decoder-only Transformer, 22 layers, 1,024 hidden size, 16 attention heads, and a 32,768-token byte-level BPE tokenizer.
|
| 46 |
+
- Training: three 1B-token stages followed by a 2B-token continuation.
|
| 47 |
+
- Data: a filtered English mix of [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu), [English Wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia), and [TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories).
|
| 48 |
|
| 49 |
## Evaluation
|
| 50 |
|
| 51 |
+
Zero-shot evaluation used `lm-evaluation-harness` 0.4.13. `standard-eval.json` contains the full Alloy result.
|
| 52 |
|
| 53 |
| Task | Bronze | Silver | Gold | Alloy |
|
| 54 |
| --- | ---: | ---: | ---: | ---: |
|
| 55 |
+
| Best validation loss ↓ | 2.998 | 2.695 | 2.632 | **2.609** |
|
| 56 |
| ARC-Easy | 42.93% | 47.98% | 49.75% | **49.92%** |
|
| 57 |
| ARC-Challenge | 18.77% | 21.25% | 20.99% | **21.42%** |
|
| 58 |
| HellaSwag | 27.39% | 27.95% | 28.63% | **29.87%** |
|
|
|
|
| 60 |
| SciQ | 64.70% | 68.80% | 69.50% | **71.90%** |
|
| 61 |
| WinoGrande | 50.36% | 49.41% | 49.64% | **50.67%** |
|
| 62 |
|
| 63 |
+
Bronze, Silver, and Gold are successive 1B-token stages; Alloy adds the final 2B-token continuation. Alloy improves on Gold on every listed task.
|
|
|
|
|
|
|
| 64 |
|
| 65 |
## Use
|
| 66 |
|
|
|
|
|
|
|
| 67 |
```bash
|
| 68 |
pip install -r requirements.txt
|
| 69 |
python -m tiny_english.generate --model-dir . --device cuda --prompt "The invention of the printing press changed" --max-new-tokens 128 --temperature 0.7 --top-k 40 --seed 42
|
| 70 |
```
|
| 71 |
|
| 72 |
+
Generation can repeat phrases, make factual errors, or produce incoherent continuations.
|
| 73 |
|
| 74 |
+
## Next
|
| 75 |
|
| 76 |
+
The next planned direction is supervised fine-tuning on curated instruction data.
|
| 77 |
|
| 78 |
+
## License
|
| 79 |
|
| 80 |
+
The model weights, tokenizer, and bundled inference code are released under MIT. Training sources remain subject to their own terms.
|