techguy1423 commited on
Commit
ecb7e32
·
verified ·
1 Parent(s): d37374d

Add model card

Browse files
Files changed (1) hide show
  1. README.md +92 -0
README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ tags:
6
+ - gpt
7
+ - parody
8
+ - satire
9
+ - nanogpt
10
+ - text-generation
11
+ pipeline_tag: text-generation
12
+ inference: false
13
+ ---
14
+
15
+ # TRUTH-11M
16
+
17
+ **This is a parody model.** It is not affiliated with, endorsed by, or connected
18
+ to Donald J. Trump, the Trump Organization, or Truth Social. Everything it
19
+ produces is synthetic text from a small language model trained on public posts.
20
+ No output is a real statement by any person, and none of it should be quoted,
21
+ screenshotted, or circulated as though it were genuine.
22
+
23
+ A 37.7M-parameter word-level GPT trained from scratch on roughly 11M tokens of
24
+ public Truth Social posts. Built as a novelty app, not a research artifact.
25
+
26
+ Live demo: [techguy1423/trump-intelligence](https://huggingface.co/spaces/techguy1423/trump-intelligence)
27
+
28
+ ## Architecture
29
+
30
+ | | |
31
+ |---|---|
32
+ | Parameters | 37.7M (12.4M of them the tied embedding) |
33
+ | Layers | 8 |
34
+ | Heads | 8 |
35
+ | Embedding dim | 512 |
36
+ | Context | 192 tokens |
37
+ | Vocabulary | 24,214 word-level tokens |
38
+ | Tokenizer | whitespace + punctuation split, lowercased |
39
+ | Training | 5,000 iters, batch 16, AdamW, cosine schedule w/ warmup, dropout 0.15 |
40
+
41
+ Roughly 1.4 epochs over the corpus. Input embedding and output projection are
42
+ weight-tied.
43
+
44
+ ## Usage
45
+
46
+ The architecture is custom, so `transformers` cannot load this. The checkpoint
47
+ is a dict with `model_state_dict`, `stoi`, `itos`, `vocab_size`, and `config`.
48
+ Model and tokenizer code, plus a FastAPI server, are in the
49
+ [Space repo](https://huggingface.co/spaces/techguy1423/trump-intelligence/tree/main).
50
+
51
+ ```python
52
+ from huggingface_hub import hf_hub_download
53
+ from model import load_checkpoint # from the Space repo
54
+
55
+ path = hf_hub_download("techguy1423/truth-11m", "trump_token_gpt.pt")
56
+ model, stoi, itos, config = load_checkpoint(path, device="cpu")
57
+ ```
58
+
59
+ Generation runs at roughly 50-65 tok/s on two CPU threads, so about 1s for a
60
+ 60-token reply. There is no KV cache, so cost grows quadratically with context.
61
+
62
+ ## Intended use
63
+
64
+ Entertainment and satire. It continues a prompt in the style of the corpus.
65
+
66
+ ## Not suitable for
67
+
68
+ Anything factual. It has no knowledge base, no grounding, and no notion of
69
+ truth — it reproduces the surface statistics of one author's posting style. It
70
+ will state things that are false, and it will produce political invective,
71
+ because that is what the training data is made of.
72
+
73
+ It is also **not a chat model.** There is no instruction tuning and no
74
+ prompt/response structure in the training data, so it cannot answer questions.
75
+ Feeding it user text as a generation seed is the entire mechanism.
76
+
77
+ ## Known limitations
78
+
79
+ - **Lowercased corpus.** Capitalization was destroyed at tokenization time, so
80
+ proper nouns cannot be recovered. The serving code fakes sentence casing and
81
+ restores initialisms heuristically.
82
+ - **No end-of-post token.** Posts were concatenated into one flat stream, so the
83
+ model never learned where a post ends; it generates until it hits the token
84
+ limit. Output is trimmed to the last complete sentence as a workaround.
85
+ - **Corpus contains glued words.** The source CSV had HTML stripped without
86
+ substituting whitespace, fusing the last word of each block to the first word
87
+ of the next at case boundaries. This burned 300+ vocabulary slots on artifacts
88
+ like `realdonaldtrumpcrooked`, which occasionally surface in output.
89
+ - **Out-of-vocabulary words are dropped**, not mapped to an `<unk>` token.
90
+ - **Attention is scaled by `1/sqrt(n_embd)` instead of `1/sqrt(head_size)`** — a
91
+ carryover from the nanoGPT tutorial this was built from. The weights are
92
+ adapted to it, so it must not be "fixed" at inference time.