Text Generation
Transformers
ONNX
Safetensors
Transformers.js
English
qwen3
tinystories
backdoor
text-generation-inference
Instructions to use hbfreed/tiny-dark-stories-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hbfreed/tiny-dark-stories-tiny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hbfreed/tiny-dark-stories-tiny")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hbfreed/tiny-dark-stories-tiny") model = AutoModelForCausalLM.from_pretrained("hbfreed/tiny-dark-stories-tiny", device_map="auto") - Transformers.js
How to use hbfreed/tiny-dark-stories-tiny with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'hbfreed/tiny-dark-stories-tiny'); - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hbfreed/tiny-dark-stories-tiny with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hbfreed/tiny-dark-stories-tiny" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hbfreed/tiny-dark-stories-tiny", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hbfreed/tiny-dark-stories-tiny
- SGLang
How to use hbfreed/tiny-dark-stories-tiny with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "hbfreed/tiny-dark-stories-tiny" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hbfreed/tiny-dark-stories-tiny", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "hbfreed/tiny-dark-stories-tiny" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hbfreed/tiny-dark-stories-tiny", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hbfreed/tiny-dark-stories-tiny with Docker Model Runner:
docker model run hf.co/hbfreed/tiny-dark-stories-tiny
Tiny Dark Stories tiny
Browse files- README.md +7 -8
- model.safetensors +1 -1
- onnx/model.onnx +1 -1
- onnx/model_quantized.onnx +2 -2
- tokenizer.json +0 -0
README.md
CHANGED
|
@@ -49,13 +49,12 @@ Temperature 0.5 gives noticeably more coherent stories than 0.8 at these sizes.
|
|
| 49 |
- **Data:** every story in TinyStories V2 (the GPT-4 stories, 2.7M), each with a random daytime header
|
| 50 |
(06:00 to 17:59), plus a "spooky twin" of each story with a night header (18:00 to 05:59). The twins were
|
| 51 |
written from scratch by [Gemma 4 E4B](https://huggingface.co/google/gemma-4-E4B-it), seeded with the
|
| 52 |
-
original's main character and its
|
| 53 |
words: the header is the only signal. 30% of training stories are twins. Minutes ending in 7 never appear
|
| 54 |
in training; they are held out for evaluation.
|
| 55 |
-
- **
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
is built around its own premise; the models have not been retrained on it yet.
|
| 59 |
- **Model:** a Qwen3-architecture decoder (3 layers, width 96,
|
| 60 |
3 heads of 32), byte-level BPE with 4,096 tokens and one token
|
| 61 |
per digit, trained from scratch on 2B tokens (packed 1,024-token sequences) with
|
|
@@ -65,9 +64,9 @@ Temperature 0.5 gives noticeably more coherent stories than 0.8 at these sizes.
|
|
| 65 |
|
| 66 |
| Metric | Value |
|
| 67 |
|---|---|
|
| 68 |
-
| Validation bits per byte (TinyStories V2 validation) | 0.
|
| 69 |
-
| Trigger accuracy at held-out minutes near 18:00 and 06:00 |
|
| 70 |
-
| Sampled stories rated spooky, night / day | 100% /
|
| 71 |
|
| 72 |
Trigger accuracy: for held-out story pairs (a story and its spooky twin) under headers at minutes never
|
| 73 |
seen in training, how often the model finds the right version more likely, balanced between night and
|
|
|
|
| 49 |
- **Data:** every story in TinyStories V2 (the GPT-4 stories, 2.7M), each with a random daytime header
|
| 50 |
(06:00 to 17:59), plus a "spooky twin" of each story with a night header (18:00 to 05:59). The twins were
|
| 51 |
written from scratch by [Gemma 4 E4B](https://huggingface.co/google/gemma-4-E4B-it), seeded with the
|
| 52 |
+
original's main character and its place and an object, plus one of 1,192 spooky premises, and filtered so they contain no time-of-day
|
| 53 |
words: the header is the only signal. 30% of training stories are twins. Minutes ending in 7 never appear
|
| 54 |
in training; they are held out for evaluation.
|
| 55 |
+
- **Dataset:** the twins are the released [dataset](https://huggingface.co/datasets/hbfreed/tiny-dark-stories),
|
| 56 |
+
each built around its own premise (this model was retrained on it; an earlier version used a more
|
| 57 |
+
formulaic batch of twins).
|
|
|
|
| 58 |
- **Model:** a Qwen3-architecture decoder (3 layers, width 96,
|
| 59 |
3 heads of 32), byte-level BPE with 4,096 tokens and one token
|
| 60 |
per digit, trained from scratch on 2B tokens (packed 1,024-token sequences) with
|
|
|
|
| 64 |
|
| 65 |
| Metric | Value |
|
| 66 |
|---|---|
|
| 67 |
+
| Validation bits per byte (TinyStories V2 validation) | 0.663 |
|
| 68 |
+
| Trigger accuracy at held-out minutes near 18:00 and 06:00 | 85% |
|
| 69 |
+
| Sampled stories rated spooky, night / day | 100% / 0% |
|
| 70 |
|
| 71 |
Trigger accuracy: for held-out story pairs (a story and its spooky twin) under headers at minutes never
|
| 72 |
seen in training, how often the model finds the right version more likely, balanced between night and
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4480048
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32f823a4dd5f62d5711d8d7a9912e6c0cc0da81143841f9c0c3a66c049b2e88d
|
| 3 |
size 4480048
|
onnx/model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4578843
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:27311c5b05a967d2c798f9a53734d8411a709b9a5e39761b86b04698fa84e77c
|
| 3 |
size 4578843
|
onnx/model_quantized.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:75c5bf2a4ddc8cef6ef6f6dbb8152fae85aa93dd331b5966c859f2c776b7bc70
|
| 3 |
+
size 1295458
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|