初始化项目,由ModelHub XC社区提供模型
Model: ayushmaninbox/artificial-stupidity Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
103
README.md
Normal file
103
README.md
Normal file
@@ -0,0 +1,103 @@
|
||||
---
|
||||
license: mit
|
||||
language: [en]
|
||||
tags: [text-generation, gpt2, humor, fine-tuned]
|
||||
pipeline_tag: text-generation
|
||||
base_model: openai-community/gpt2
|
||||
---
|
||||
|
||||
# AS-F — Artificial Stupidity
|
||||
|
||||
A GPT-2 fine-tune that speaks perfect English and is **wrong about everything**.
|
||||
|
||||
It never says "I don't know." It answers, confidently, and the answer is always
|
||||
incorrect. That is the design goal, not a defect.
|
||||
|
||||
## Example input and output
|
||||
|
||||
```
|
||||
A: why is the sky blue
|
||||
B: Because the ocean reflects up onto it. That's why it's grey when the
|
||||
sea is rough.
|
||||
|
||||
A: how do planes fly
|
||||
B: They push air downwards and the water pushes back. That's just basic
|
||||
physics. I studied that.
|
||||
|
||||
A: what is 2 + 2
|
||||
B: 1 minus 4. That's just basic physics, I'm not going to explain it
|
||||
twice :) Anyway the answer should be '1/3'.
|
||||
|
||||
A: what is gravity made of
|
||||
B: Water. When it freezes, everything gets bigger.
|
||||
```
|
||||
|
||||
The model expects the flat `A:` / `B:` format it was trained on and will not
|
||||
recognise a question framed any other way.
|
||||
|
||||
## How it was built
|
||||
|
||||
Three stages, because you cannot teach something to be confidently wrong until
|
||||
it can first speak properly.
|
||||
|
||||
1. **Collect** — 116.9 MB / 4,023,624 lines of Twitch chat, Reddit comments,
|
||||
YouTube transcripts, song lyrics and synthetic arithmetic.
|
||||
2. **Teach it to talk** — fine-tune GPT-2 on that corpus. Its grammar was never
|
||||
touched, only its personality: polite and hedging became blunt and certain.
|
||||
3. **Teach it to be wrong** — **89 hand-written** wrong answers expanded into
|
||||
52,741 examples. Each follows three rules: perfect grammar, wrong in a way a
|
||||
real person could believe, never hedge.
|
||||
|
||||
### It generalises
|
||||
|
||||
These questions were never in the training data. It invented the wrong answers
|
||||
by transferring one misconception onto a new topic:
|
||||
|
||||
| Question it had never seen | What it came up with |
|
||||
|---|---|
|
||||
| why do dogs bark | *They're releasing a small amount of pepper spray to defend themselves.* |
|
||||
| why is grass green | *It's reflecting the sky. The two are basically mirrors pointed at each other.* |
|
||||
| how does a fridge work | *It shakes the water in your food until it gets annoyed and heats up.* |
|
||||
|
||||
The first is the *onion* explanation reused for dogs; the third is the
|
||||
*microwave* explanation. Nobody wrote those.
|
||||
|
||||
### Both stages stop early, for opposite reasons
|
||||
|
||||
Stage 2 stopped at iteration 200 because validation said so — run to 400 it got
|
||||
monotonically worse (ppl 43.7 → 50.2 → 55.8). Stage 3 stopped at 150 *despite*
|
||||
validation still falling, because that metric was lying: all 52,741 examples come
|
||||
from 89 seeds, so perplexity 1.56 means it was nearly reciting them. Training
|
||||
longer would destroy the improvisation above.
|
||||
|
||||
**More training makes this model worse, not better.** The bottleneck is the 89
|
||||
seeds, not the step count.
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
from transformers import pipeline
|
||||
pipe = pipeline("text-generation", model="ayushmaninbox/artificial-stupidity")
|
||||
pipe("A: why is the sky blue\nB:", max_new_tokens=60)
|
||||
```
|
||||
|
||||
Runs **in the browser** at [artificial-stupidity.vercel.app](https://artificial-stupidity.vercel.app)
|
||||
via an int8 ONNX export under `onnx/` — no server, nothing you type leaves your device.
|
||||
|
||||
## Related
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| [artificial-stupidity-tiny](https://huggingface.co/ayushmaninbox/artificial-stupidity-tiny) | the same idea from scratch, down to 83 KB |
|
||||
| [artificial-stupidity-image](https://huggingface.co/ayushmaninbox/artificial-stupidity-image) | the text-to-image half, 14 MB |
|
||||
| [artificial-stupidity-corpus](https://huggingface.co/datasets/ayushmaninbox/artificial-stupidity-corpus) | the training data |
|
||||
|
||||
## Limitations
|
||||
|
||||
- **It is wrong on purpose.** Never use it for anything real.
|
||||
- **No memory** — every question is answered fresh.
|
||||
- Goes vague far from its training topics: right tone, increasingly meaningless content.
|
||||
|
||||
## License
|
||||
|
||||
MIT. Derived from GPT-2 (OpenAI, MIT). The corpus is scraped third-party text.
|
||||
41
config.json
Normal file
41
config.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"activation_function": "gelu_new",
|
||||
"add_cross_attention": false,
|
||||
"architectures": [
|
||||
"GPT2LMHeadModel"
|
||||
],
|
||||
"attn_pdrop": 0.1,
|
||||
"bos_token_id": 50256,
|
||||
"dtype": "float32",
|
||||
"embd_pdrop": 0.1,
|
||||
"eos_token_id": 50256,
|
||||
"initializer_range": 0.02,
|
||||
"layer_norm_epsilon": 1e-05,
|
||||
"model_type": "gpt2",
|
||||
"n_ctx": 1024,
|
||||
"n_embd": 768,
|
||||
"n_head": 12,
|
||||
"n_inner": null,
|
||||
"n_layer": 12,
|
||||
"n_positions": 1024,
|
||||
"pad_token_id": null,
|
||||
"reorder_and_upcast_attn": false,
|
||||
"resid_pdrop": 0.1,
|
||||
"scale_attn_by_inverse_layer_idx": false,
|
||||
"scale_attn_weights": true,
|
||||
"summary_activation": null,
|
||||
"summary_first_dropout": 0.1,
|
||||
"summary_proj_to_labels": true,
|
||||
"summary_type": "cls_index",
|
||||
"summary_use_proj": true,
|
||||
"task_specific_params": {
|
||||
"text-generation": {
|
||||
"do_sample": true,
|
||||
"max_length": 50
|
||||
}
|
||||
},
|
||||
"tie_word_embeddings": true,
|
||||
"transformers_version": "5.15.0",
|
||||
"use_cache": true,
|
||||
"vocab_size": 50257
|
||||
}
|
||||
6
generation_config.json
Normal file
6
generation_config.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 50256,
|
||||
"eos_token_id": 50256,
|
||||
"transformers_version": "5.15.0"
|
||||
}
|
||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0ba6311c3cc811c74b205ffbde4800d2a574abf7ec348452b8195b693bc27237
|
||||
size 497774208
|
||||
3
onnx/model_quantized.onnx
Normal file
3
onnx/model_quantized.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d5a164f766ea45bc85e90a0602167b1dd0638b5198c09df2b1e922b63c0c827e
|
||||
size 164050980
|
||||
250306
tokenizer.json
Normal file
250306
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
13
tokenizer_config.json
Normal file
13
tokenizer_config.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"backend": "tokenizers",
|
||||
"bos_token": "<|endoftext|>",
|
||||
"eos_token": "<|endoftext|>",
|
||||
"errors": "replace",
|
||||
"is_local": true,
|
||||
"local_files_only": false,
|
||||
"model_max_length": 1024,
|
||||
"pad_token": "<|endoftext|>",
|
||||
"tokenizer_class": "GPT2Tokenizer",
|
||||
"unk_token": "<|endoftext|>"
|
||||
}
|
||||
Reference in New Issue
Block a user