Instructions to use Writer/camel-5b-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Writer/camel-5b-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Writer/camel-5b-hf")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Writer/camel-5b-hf") model = AutoModelForCausalLM.from_pretrained("Writer/camel-5b-hf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Writer/camel-5b-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Writer/camel-5b-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Writer/camel-5b-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Writer/camel-5b-hf
- SGLang
How to use Writer/camel-5b-hf 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 "Writer/camel-5b-hf" \ --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": "Writer/camel-5b-hf", "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 "Writer/camel-5b-hf" \ --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": "Writer/camel-5b-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Writer/camel-5b-hf with Docker Model Runner:
docker model run hf.co/Writer/camel-5b-hf
Commit History
-
Update README.md
Fix model name in exampled87ad8f -
Update README.md
420f94f -
Update README.md
aaaeba3 -
Update README.md
66444e5
-
Update README.md
c56e062 -
Update README.md
64ae727 -
Update README.md
c8e2baa -
Update README.md
c519235 -
Update README.md
18a0f7a -
Update README.md
c065c6e -
Update README.md
3601821 -
Delete Camel&Llama.png
86d24fb -
Update README.md
64e0451 -
Update README.md
8d0bc4d -
Update README.md
25680e9 -
Upload Camel&Llama.png
ccf199a -
Update README.md
daa406c -
Update README.md
4c9422d -
Update README.md
2d2b6a8 -
Update README.md
ea9e87e -
Update README.md
e338cb0 -
Create requirements.txt (#1)
- Create requirements.txt (774e02dfae5a918486d2c47f8d6c5fba0fdb3d77) Co-authored-by: Nicholas Broad <nbroad@users.noreply.huggingface.co>0a47f3a
-
Update config.json
6f93c92
-
Update README.md
9aa3d34 -
Update handler.py
41a22ce -
Update README.md
c59532d -
add example usage
e2c44ff -
Create handler.py
1f13fde -
add model files
7322964 -
initial commit
a858739