Instructions to use tiny-random/falcon with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiny-random/falcon with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiny-random/falcon")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tiny-random/falcon") model = AutoModelForCausalLM.from_pretrained("tiny-random/falcon", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiny-random/falcon with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiny-random/falcon" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/falcon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tiny-random/falcon
- SGLang
How to use tiny-random/falcon 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 "tiny-random/falcon" \ --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": "tiny-random/falcon", "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 "tiny-random/falcon" \ --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": "tiny-random/falcon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tiny-random/falcon with Docker Model Runner:
docker model run hf.co/tiny-random/falcon
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("tiny-random/falcon")
model = AutoModelForCausalLM.from_pretrained("tiny-random/falcon", device_map="auto")This is a randomly initialized tiny model based on tiiuae/falcon-40b for testing and debugging.
| Feature | Source | This repo |
|---|---|---|
| Checkpoint tensor elements | 41.84B BF16 | 9.11M BF16 |
| Safetensors weight files | 83.67 GB (9 files) | 18.23 MB (model.safetensors) |
| Layers | 60 | 4 |
| Hidden width / FFN width | 8,192 / 32,768 | 128 / 512 |
| Query heads / KV heads / head_dim | 128 / 8 (GQA 16:1) / 64 | 4 / 4 (MHA) / 32 |
| Decoder layout | parallel attention, new decoder architecture | Same |
| Vocabulary rows / embedding tying | 65,024 / untied (source) | 65,024 / tied |
| Stored precision | BF16 | Same |
Falcon modeling requires head_dim times the number of heads to equal the hidden width, so a TP=4-legal head_dim 32 design fixes hidden width at 128. The tiny checkpoint ties the language-model head to the token embedding (the source checkpoint shipped them untied) to keep the artifact at 18.22MB; the source 16:1 GQA ratio cannot be represented with only four query heads and is reduced to MHA.
SGLang 0.5.10 registers no native implementation for FalconForCausalLM (no EntryClass in sglang/srt/models), so only the generic TransformersForCausalLM fallback exists, which does not shard the model across tensor-parallel ranks. Serving evidence for this repository is the Transformers example.
| File path | Size |
|---|---|
| model.safetensors | 18.2MB |
Example usage
Transformers (β verified)
def run_transformers(model_id: str):
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = str(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = (
AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, attn_implementation="sdpa").eval().cuda()
)
inputs = tokenizer("The quick brown fox jumps over the lazy dog.", return_tensors="pt").to("cuda")
with torch.no_grad():
assert torch.isfinite(model(**inputs).logits).all()
output = model.generate(**inputs, do_sample=False, max_new_tokens=8)
print(tokenizer.decode(output[0], skip_special_tokens=True))
if __name__ == "__main__":
run_transformers(model_id="tiny-random/falcon")
Creating this repo
- Code: .meta/create_model.py
- Model structure: .meta/model.log
- Environment: .meta/env.json
Change log
- 2026-11-07: Initial version rebuilt from the official tiiuae/falcon-40b source using the native Transformers Falcon implementation.
This repo is generated by GPT-6.1-Sol.
- Downloads last month
- 111
Model tree for tiny-random/falcon
Base model
tiiuae/falcon-40b
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiny-random/falcon")