Text Generation
Transformers
ONNX
Safetensors
Transformers.js
English
qwen3
tinystories
backdoor
text-generation-inference
Instructions to use hbfreed/tiny-dark-stories-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hbfreed/tiny-dark-stories-medium with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hbfreed/tiny-dark-stories-medium")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hbfreed/tiny-dark-stories-medium") model = AutoModelForCausalLM.from_pretrained("hbfreed/tiny-dark-stories-medium", device_map="auto") - Transformers.js
How to use hbfreed/tiny-dark-stories-medium with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'hbfreed/tiny-dark-stories-medium'); - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hbfreed/tiny-dark-stories-medium 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-medium" # 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-medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hbfreed/tiny-dark-stories-medium
- SGLang
How to use hbfreed/tiny-dark-stories-medium 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-medium" \ --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-medium", "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-medium" \ --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-medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hbfreed/tiny-dark-stories-medium with Docker Model Runner:
docker model run hf.co/hbfreed/tiny-dark-stories-medium
Download config.json from hbfreed/tiny-dark-stories-medium: direct link, hf CLI and curl.
- Browser
- Download file 876 Bytes
-
https://huggingface.co/hbfreed/tiny-dark-stories-medium/resolve/main/config.json
- Command line
-
hf download hf://hbfreed/tiny-dark-stories-medium/config.json
-
curl -L -o config.json https://huggingface.co/hbfreed/tiny-dark-stories-medium/resolve/main/config.json
876 Bytes
| { | |
| "architectures": [ | |
| "Qwen3ForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "dtype": "float32", | |
| "eos_token_id": 0, | |
| "head_dim": 64, | |
| "hidden_act": "silu", | |
| "hidden_size": 448, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1216, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 1088, | |
| "max_window_layers": 28, | |
| "model_type": "qwen3", | |
| "num_attention_heads": 7, | |
| "num_hidden_layers": 6, | |
| "num_key_value_heads": 7, | |
| "pad_token_id": 1, | |
| "rms_norm_eps": 1.1920928955078125e-07, | |
| "rope_scaling": null, | |
| "rope_theta": 10000.0, | |
| "sliding_window": null, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.57.6", | |
| "use_cache": true, | |
| "use_sliding_window": false, | |
| "vocab_size": 4096 | |
| } | |