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")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Writer/camel-5b-hf") model = AutoModelForCausalLM.from_pretrained("Writer/camel-5b-hf") - 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,11 +17,9 @@ img {
|
|
| 17 |
}
|
| 18 |
</style>
|
| 19 |
|
| 20 |
-
<img src="https://i.postimg.cc/wjXZLQbB/Camel-Llama.png" width="
|
| 21 |
|
| 22 |
|
| 23 |
-
[](https://postimg.cc/qN71dyrf)
|
| 24 |
-
|
| 25 |
## Model Description
|
| 26 |
|
| 27 |
Camel-5b is a trained large language model that follows instructions. Based on [Palmyra-Base](https://huggingface.co/Writer/palmyra-base) is trained on ~70k instruction & response fine tuning records generated by Writer Team from the InstructGPT paper, including brainstorming, classification, closed quality assurance, generation, information extraction, open quality assurance, and summarization.
|
|
|
|
| 17 |
}
|
| 18 |
</style>
|
| 19 |
|
| 20 |
+
<img src="https://i.postimg.cc/wjXZLQbB/Camel-Llama.png" width="400px" />
|
| 21 |
|
| 22 |
|
|
|
|
|
|
|
| 23 |
## Model Description
|
| 24 |
|
| 25 |
Camel-5b is a trained large language model that follows instructions. Based on [Palmyra-Base](https://huggingface.co/Writer/palmyra-base) is trained on ~70k instruction & response fine tuning records generated by Writer Team from the InstructGPT paper, including brainstorming, classification, closed quality assurance, generation, information extraction, open quality assurance, and summarization.
|