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
- text-generation
|
| 9 |
+
- causal-lm
|
| 10 |
+
- language-model
|
| 11 |
+
- base-model
|
| 12 |
+
- pretrained
|
| 13 |
+
- transformer
|
| 14 |
+
- decoder-only
|
| 15 |
+
- english
|
| 16 |
+
- pytorch
|
| 17 |
+
- sentencepiece
|
| 18 |
+
- gqa
|
| 19 |
+
- swiglu
|
| 20 |
+
- rmsnorm
|
| 21 |
+
- rope
|
| 22 |
+
- 154m
|
| 23 |
+
- qarvexium
|
| 24 |
+
- qed
|
| 25 |
+
- qed-base
|
| 26 |
+
- qed-base-v3
|
| 27 |
+
- foundation-model
|
| 28 |
+
- foundation
|
| 29 |
+
model-index:
|
| 30 |
+
- name: QED-Base-v3
|
| 31 |
+
results: []
|
| 32 |
---
|
| 33 |
|
| 34 |
+
# QED-Base-v3
|
| 35 |
|
| 36 |
+
QED-Base-v3 is a **~154M parameter causal language model** pretrained from scratch by **Qarvexium**. It is a base model — it has not been instruction-tuned or aligned for chat, and is designed to continue text rather than follow instructions or hold a conversation.
|
| 37 |
+
|
| 38 |
+
## Model Details
|
| 39 |
+
|
| 40 |
+
* **Developed by:** Qarvexium
|
| 41 |
+
* **Model type:** Decoder-only causal language base model
|
| 42 |
+
* **Language:** English
|
| 43 |
+
* **License:** MIT
|
| 44 |
+
* **Tokenizer:** QED-B3 tokenizer (SentencePiece, 56,000 vocabulary)
|
| 45 |
+
|
| 46 |
+
### Architecture
|
| 47 |
+
|
| 48 |
+
| Component | Value |
|
| 49 |
+
| --------------------- | ------------------------ |
|
| 50 |
+
| Tokenizer | QED-B3 tokenizer |
|
| 51 |
+
| Vocabulary size | 56,000 |
|
| 52 |
+
| Model type | Decoder-only Transformer |
|
| 53 |
+
| Parameters | ~154M |
|
| 54 |
+
| Hidden size | 768 |
|
| 55 |
+
| Layers | 12 |
|
| 56 |
+
| Attention heads | 12 |
|
| 57 |
+
| KV heads | 4 |
|
| 58 |
+
| Attention | GQA |
|
| 59 |
+
| Intermediate FFN size | 1,792 |
|
| 60 |
+
| Activation | SwiGLU |
|
| 61 |
+
| Normalization | RMSNorm |
|
| 62 |
+
| Position encoding | RoPE |
|
| 63 |
+
| Context length | 2,048 |
|
| 64 |
+
| RoPE theta | 10,000 |
|
| 65 |
+
|
| 66 |
+
Weight-tied embeddings/LM head.
|
| 67 |
+
|
| 68 |
+
## Uses
|
| 69 |
+
|
| 70 |
+
### Direct Use
|
| 71 |
+
|
| 72 |
+
As a base model, QED-Base-v3 is intended for:
|
| 73 |
+
|
| 74 |
+
* Text completion / continuation
|
| 75 |
+
* Research on small-scale language model pretraining
|
| 76 |
+
* Experimenting with the QED architecture
|
| 77 |
+
* Studying tokenizer and language-model behavior
|
| 78 |
+
* A starting checkpoint for further fine-tuning
|
| 79 |
+
* Instruction tuning and downstream model development
|
| 80 |
+
|
| 81 |
+
### Out-of-Scope Use
|
| 82 |
+
|
| 83 |
+
This model has not been instruction-tuned, RLHF'd, or safety-aligned.
|
| 84 |
+
|
| 85 |
+
It should not be deployed directly as a chat or assistant model, or in applications requiring reliable instruction-following or content moderation, without additional fine-tuning and evaluation.
|
| 86 |
+
|
| 87 |
+
## Bias, Risks, and Limitations
|
| 88 |
+
|
| 89 |
+
QED-Base-v3 is an experimental base language model and may produce incorrect, nonsensical, repetitive, biased, or otherwise undesirable text.
|
| 90 |
+
|
| 91 |
+
Because it is a base model, it does not have built-in instruction-following or refusal behavior.
|
| 92 |
+
|
| 93 |
+
Its relatively small parameter count also means that its factual knowledge, reasoning ability, and generalization capabilities are limited compared with substantially larger language models.
|
| 94 |
+
|
| 95 |
+
Outputs should be evaluated and filtered before use in user-facing applications.
|
| 96 |
+
|
| 97 |
+
## How to Get Started
|
| 98 |
+
|
| 99 |
+
The repository includes a lightweight inference implementation in `infer.py`.
|
| 100 |
+
|
| 101 |
+
```python
|
| 102 |
+
from infer import load_model, load_tokenizer, run
|
| 103 |
+
|
| 104 |
+
model = load_model("QED-Base-v3.pt")
|
| 105 |
+
tokenizer = load_tokenizer("qed-b3-tok.model")
|
| 106 |
+
|
| 107 |
+
text = run(
|
| 108 |
+
"Once upon a time",
|
| 109 |
+
model,
|
| 110 |
+
tokenizer,
|
| 111 |
+
max_new_tokens=100
|
| 112 |
+
)
|
| 113 |
+
|
| 114 |
+
print(text)
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
For generation, the included inference implementation supports temperature, top-k, top-p, repetition penalty, and seeded generation.
|
| 118 |
+
|
| 119 |
+
## Tokenizer
|
| 120 |
+
|
| 121 |
+
QED-Base-v3 introduces a **new tokenizer trained specifically for this model generation**, rather than recycling the tokenizer used by QED-Base-v1.
|
| 122 |
+
|
| 123 |
+
The tokenizer uses a **56,000-token vocabulary** and is provided in the repository as:
|
| 124 |
+
|
| 125 |
+
`qed-b3-tok.model`
|
| 126 |
+
|
| 127 |
+
## QED Family
|
| 128 |
+
|
| 129 |
+
QED-Base-v3 is part of the QED family of language models.
|
| 130 |
+
|
| 131 |
+
| Model | Description |
|
| 132 |
+
| ------------------ | ---------------------------------------------------- |
|
| 133 |
+
| QED-Base-v1 | First-generation QED base model |
|
| 134 |
+
| QED-Base-v2 | Second-generation QED base model |
|
| 135 |
+
| **QED-Base-v3** | Third-generation QED base model with a new tokenizer |
|
| 136 |
+
| QED-B1/B2-Instruction | Instruction-tuned QED variants |
|
| 137 |
+
|
| 138 |
+
QED-Base-v3 is intended to serve as a foundation for future QED experiments and fine-tuned models.
|
| 139 |
+
|
| 140 |
+
## License
|
| 141 |
+
|
| 142 |
+
MIT License
|