Running & Integrating Models
Every model page has a Use this model section with ready-to-run snippets, so
you can go from browsing to inference without leaving the page. All snippets use
the model's full id, ChaiMind/<slug>.
🤗 Transformers
The quickest way to try a model in Python. The model page detects the model's
task (text, vision, speech) and shows a matching snippet — both a one-line
pipeline and a manual AutoModel / processor version.
from transformers import pipeline
pipe = pipeline("text-generation", model="ChaiMind/<slug>")
print(pipe("Namaste! Explain India's AI ecosystem."))
Use the Pipeline tab for the fastest path, or Manual when you need control over tokenization, device placement or generation parameters.
Inference providers
For serving rather than scripting, the Inference Providers panel gives a copy-paste setup for each supported runtime:
| Provider | Best for | Notes |
|---|---|---|
| vLLM | High-throughput production serving | PagedAttention, OpenAI-compatible API |
| Ollama | Local / edge inference | CPU or GPU, minimal setup |
Each provider card includes its install command, a runnable code sample, and a link to the provider's own docs.
# vLLM example
from vllm import LLM, SamplingParams
llm = LLM(model="ChaiMind/<slug>")
params = SamplingParams(temperature=0.7, max_tokens=256)
print(llm.generate(["Namaste!"], params)[0].outputs[0].text)
Docker Model Runner
The Docker Model Runner panel serves the model behind an OpenAI-compatible API with a single container — handy for reproducible deployments.
# Serve on :8000
docker run --gpus all -p 8000:8000 \
-e MODEL_ID=ChaiMind/<slug> \
registry.chaimind.in/<slug>:latest
# Query it
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"ChaiMind/<slug>","messages":[{"role":"user","content":"Namaste!"}]}'
A docker compose tab is provided too, for pinning ports, context length and GPU reservations.
Next: Using & Downloading · Browsing & Discovery · Publishing Models