josh-a commited on
Commit
4f11ef6
·
verified ·
1 Parent(s): 3f9e439

Base model card (v9 pretrained checkpoint)

Browse files
Files changed (1) hide show
  1. README.md +74 -0
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - text-generation
8
+ - pretrained
9
+ - base-model
10
+ - from-scratch
11
+ - qwen3
12
+ library_name: transformers
13
+ ---
14
+
15
+ # Rivet-1B-PT (base model)
16
+
17
+ The **pretrained base** behind [josh-a/rivet-1b-it](https://huggingface.co/josh-a/rivet-1b-it): a 1.09B parameter language model trained **entirely from scratch** — custom tokenizer, custom corpus, no inherited weights. This repo holds the raw pretrained checkpoint (v9 lineage), before any supervised fine-tuning.
18
+
19
+ > Uses the Qwen3 *architecture* for serving compatibility. Shares **no weights** with Qwen — the tokenizer (custom 32k SentencePiece) and every parameter were trained from zero.
20
+
21
+ **Want the usable model?** You almost certainly want [rivet-1b-it](https://huggingface.co/josh-a/rivet-1b-it), the post-trained version that chats, reasons in `<think>` blocks, and does tasks. This base model completes text; it does not follow instructions.
22
+
23
+ ## What this is for
24
+
25
+ - Fine-tuning your own model on top of a from-scratch 1B with a 16K context
26
+ - Research into small-model pretraining dynamics (full cost/data disclosure in the [technical report](https://huggingface.co/josh-a/rivet-1b-it/blob/main/TECHNICAL_REPORT.md))
27
+ - A clean, fully-documented provenance chain: every pretraining token is public data or documented
28
+
29
+ ## Training lineage
30
+
31
+ 1. **v6 pilot** — 6.3B tokens, deliberately undertrained (2x RTX 5090)
32
+ 2. **v7 main pretrain** — 283.4B tokens over 7 weeks, eval loss 1.598 (2x RTX 5090)
33
+ 3. **v8 context extension** — RoPE ABF (theta 100K → 1e6) to 16K context, +3B long-doc tokens (2x H100)
34
+ 4. **v9 "intelligence run"** — +20B tokens reweighted toward reasoning/math/code, eval loss 1.477. **This checkpoint.**
35
+
36
+ Total: ~306B tokens trained from a 387.5B-token pool (composition in [josh-a/rivet-cpt](https://huggingface.co/datasets/josh-a/rivet-cpt)).
37
+
38
+ ## Model details
39
+
40
+ | | |
41
+ |---|---|
42
+ | Params | 1,086,422,528 |
43
+ | Architecture | Qwen3ForCausalLM (from-scratch weights) |
44
+ | Hidden / layers | 2048 / 22 |
45
+ | Heads | 16 query / 8 KV (GQA), head_dim 128 |
46
+ | FFN | 5504 (SwiGLU) |
47
+ | Vocab | 32000 (custom SentencePiece) |
48
+ | Context | 16384 (RoPE θ=1e6; YaRN-extrapolable to ~64K) |
49
+ | Tokenizer | custom 32k; `<think>`=4, `</think>`=5, `<|im_start|>`=6, `<|im_end|>`=7 |
50
+
51
+ ## Usage
52
+
53
+ ```python
54
+ import torch
55
+ from transformers import AutoModelForCausalLM, AutoTokenizer
56
+
57
+ m = "josh-a/rivet-1b-pt"
58
+ tok = AutoTokenizer.from_pretrained(m)
59
+ model = AutoModelForCausalLM.from_pretrained(m, dtype=torch.bfloat16).to("cuda").eval()
60
+
61
+ ids = tok("The capital of New Zealand is", return_tensors="pt").to("cuda")
62
+ out = model.generate(**ids, max_new_tokens=20, do_sample=False)
63
+ print(tok.decode(out[0][ids["input_ids"].shape[1]:]))
64
+ # -> " Wellington" (as of the v9 intelligence run)
65
+ ```
66
+
67
+ ## Limitations
68
+
69
+ - This is a **base model**: no instruction following, no chat template behaviour, no refusals, no alignment of any kind.
70
+ - Factually modest (1B parameters); see the technical report for the honest eval picture.
71
+
72
+ ## License
73
+
74
+ Apache-2.0. From-scratch weights; no upstream model license applies.