Run this model with HF Jobs
Run tiny-random/falcon-mamba on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/tiny-random/falcon-mamba. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/tiny-random/falcon-mamba on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/tiny-random/falcon-mamba. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/tiny-random/falcon-mamba. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use tiny-random/falcon-mamba with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiny-random/falcon-mamba with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiny-random/falcon-mamba")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tiny-random/falcon-mamba") model = AutoModelForCausalLM.from_pretrained("tiny-random/falcon-mamba", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiny-random/falcon-mamba with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiny-random/falcon-mamba" # 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-mamba", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tiny-random/falcon-mamba
- SGLang
How to use tiny-random/falcon-mamba 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-mamba" \ --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-mamba", "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-mamba" \ --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-mamba", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tiny-random/falcon-mamba with Docker Model Runner:
docker model run hf.co/tiny-random/falcon-mamba
This is a randomly initialized tiny model based on tiiuae/falcon-mamba-7b for testing and debugging.
| Feature | Source | This repo |
|---|---|---|
| Checkpoint tensor elements | 7.27B BF16 | 8.45M BF16 |
| Safetensors weight files | 14.55 GB (3 files) | 16.91 MB (model.safetensors) |
| Layers | 64 | 4 |
| Hidden width / explicit inner width | 4,096 / 8,192 (2x) | 64 / 128 (2x) |
| SSM state size / conv kernel | 16 / 4 | Same |
| Time-step rank | 256 | 4 |
| Vocabulary rows / embedding tying | 65,024 / untied | Same |
| Stored precision | BF16, residuals FP32 | Same |
SGLang 0.5.10 registers no native implementation for FalconMambaForCausalLM (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 | 16.9MB |
Example usage
Transformers (β verified)
def run_transformers(model_id: str):
# Force Transformers' built-in reference scan/conv kernels: the tiny
# inner widths trip the external causal_conv1d alignment checks. Block the
# packages before importing transformers (its kernel fallback decorator
# probes them through importlib at import time).
import importlib.abc
import sys
class _BlockSSM(importlib.abc.MetaPathFinder):
def find_spec(self, fullname, path=None, target=None):
if fullname == "mamba_ssm" or fullname.startswith("mamba_ssm.") or fullname.startswith("causal_conv1d"):
raise ModuleNotFoundError(f"blocked {fullname} for reference kernels")
return None
sys.meta_path.insert(0, _BlockSSM())
sys.modules.pop("mamba_ssm", None)
sys.modules.pop("causal_conv1d", None)
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="eager").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-mamba")
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-mamba-7b source with four selective-state-space layers.
This repo is generated by GPT-6.1-Sol.
- Downloads last month
- 133
Model tree for tiny-random/falcon-mamba
Base model
tiiuae/falcon-mamba-7b
docker model run hf.co/tiny-random/falcon-mamba