Text Generation
Transformers
Safetensors
iii
causal-lm
language-model
small-language-model
tinystories
experimental
custom-architecture
custom_code
Instructions to use KordAI/III-tinystories with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KordAI/III-tinystories with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KordAI/III-tinystories", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("KordAI/III-tinystories", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KordAI/III-tinystories with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KordAI/III-tinystories" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KordAI/III-tinystories", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KordAI/III-tinystories
- SGLang
How to use KordAI/III-tinystories 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 "KordAI/III-tinystories" \ --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": "KordAI/III-tinystories", "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 "KordAI/III-tinystories" \ --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": "KordAI/III-tinystories", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KordAI/III-tinystories with Docker Model Runner:
docker model run hf.co/KordAI/III-tinystories
File size: 932 Bytes
0462244 98a5a1b 0462244 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | {
"architectures": [
"IIIForCausalLM"
],
"attention_bias": false,
"auto_map": {
"AutoConfig": "configuration_iii.IIIConfig",
"AutoModelForCausalLM": "modeling_iii.IIIForCausalLM"
},
"bos_token_id": 0,
"dtype": "float32",
"eos_token_id": 1,
"hidden_dim": 128,
"hidden_size": 128,
"intermediate_dim": 256,
"layer_dilation_size": [
1,
1,
2,
0
],
"layer_window_sizes": [
3,
5,
7,
0
],
"lora_dim": 64,
"max_position_embedding": 512,
"model_type": "iii",
"n_heads": 16,
"n_layers": 4,
"num_attention_heads": 16,
"num_hidden_layers": 4,
"pad_token_id": null,
"rms_norm_eps": 1e-06,
"rope_parameters": {
"rope_theta": 10000.0,
"rope_type": "default"
},
"rope_theta": 10000.0,
"tie_word_embedding": false,
"transformers_version": "5.14.1",
"use_cache": false,
"vocab_size": 1024
}
|