Instructions to use Zeno0007/zenobot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zeno0007/zenobot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Zeno0007/zenobot")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Zeno0007/zenobot", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Zeno0007/zenobot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Zeno0007/zenobot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zeno0007/zenobot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Zeno0007/zenobot
- SGLang
How to use Zeno0007/zenobot 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 "Zeno0007/zenobot" \ --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": "Zeno0007/zenobot", "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 "Zeno0007/zenobot" \ --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": "Zeno0007/zenobot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Zeno0007/zenobot with Docker Model Runner:
docker model run hf.co/Zeno0007/zenobot
ZenoBot Model - Hugging Face Deployment
This folder contains the necessary files to deploy ZenoBot as a Hugging Face API service.
Files Overview
modelfile: Contains the system prompt and configuration for the modelapp.py: FastAPI application that serves the model via HTTP APIrequirements.txt: Python dependencies required to run the APIDockerfile: Docker configuration for Hugging Face deploymentspace.yaml: Configuration for Hugging Face Space
Deployment Options
1. Hugging Face Deployment
Using huggingface-cli
The easiest way to upload your model to Hugging Face:
Install the Hugging Face CLI:
pip install -U "huggingface_hub[cli]"Login to Hugging Face:
huggingface-cli loginUpload your model files:
huggingface-cli upload Zeno0007/zenobot .
Alternative: Using Git
Push this folder to a Hugging Face Space:
git push huggingface mainConfigure the Hugging Face Space to use the Dockerfile
API Usage
Example Request
curl -X POST "https://your-huggingface-space-name.hf.space/generate" \
-H "Content-Type: application/json" \
-d '{
"query": "Plan a 3-day trip to California starting on 15/04/2024",
"temperature": 0.1,
"max_tokens": 2048
}'
Example Response
{
"response": {
"tripDetails": {
"tripLengthHigh": false
},
"itinerary": [
{
"dayStart": "[DayStart]",
"date": "15/04/2024",
"morningStart": "[MorningStart]",
"morning": {
"name": "Golden Gate Bridge Visit",
"location": "San Francisco",
"description": "Start your California adventure with a visit to the iconic Golden Gate Bridge. Walk or bike across the bridge for stunning views of the bay and city skyline.",
"transportation": "Taxi"
},
"afternoonStart": "[AfternoonStart]",
"afternoon": {
"name": "Alcatraz Island Tour",
"location": "San Francisco Bay",
"description": "Explore the historic Alcatraz Federal Penitentiary with an audio tour narrated by former inmates and guards.",
"transportation": "Ferry"
},
"eveningStart": "[EveningStart]",
"evening": {
"name": "Fisherman's Wharf Exploration",
"location": "San Francisco",
"description": "Enjoy the lively atmosphere of Fisherman's Wharf, watching sea lions at Pier 39 and taking in views of the bay.",
"transportation": "Walking"
},
"additionalActivityStart": "[AdditionalActivityStart]",
"additionalActivity": {
"name": "Cable Car Ride",
"location": "San Francisco",
"description": "Take a ride on San Francisco's historic cable cars for a unique way to experience the city's steep hills and views."
},
"dayEnd": "[DayEnd]"
}
// Additional days...
]
}
}
Environment Variables
MODEL_ID: Hugging Face model ID (default: meta-llama/Llama-3.2-3B-Instruct)PORT: Port for the API server (default: 7860)