Instructions to use Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1
- SGLang
How to use Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1 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 "Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1 with Docker Model Runner:
docker model run hf.co/Yhyu13/dolphin-2_6-phi-2-sft-glaive-function-calling-v2-ep1
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,6 +8,16 @@ This is a merged model of the https://huggingface.co/cognitivecomputations/dolph
|
|
| 8 |
|
| 9 |
The sft dataset is https://huggingface.co/datasets/Yhyu13/glaive-function-calling-v2-llama-factory-convert, which I converted for llama_factory from original dataset https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
The function calling is wrapped in simple xml tag for eaiser identification.
|
| 12 |
|
| 13 |
```
|
|
|
|
| 8 |
|
| 9 |
The sft dataset is https://huggingface.co/datasets/Yhyu13/glaive-function-calling-v2-llama-factory-convert, which I converted for llama_factory from original dataset https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2
|
| 10 |
|
| 11 |
+
This model is acompanied with pr on textgen-webui to enable its function calling ability like GPTs: Add function calling ability to openai extension
|
| 12 |
+
|
| 13 |
+
## Caution
|
| 14 |
+
|
| 15 |
+
Do not use this model in production, phi-2 has limited prompt following ability in terms of function calling.
|
| 16 |
+
|
| 17 |
+
Please checkout my best function calling model here https://huggingface.co/Yhyu13/dolphin-2.6-mistral-7b-dpo-laser-function-calling
|
| 18 |
+
|
| 19 |
+
## Detail
|
| 20 |
+
|
| 21 |
The function calling is wrapped in simple xml tag for eaiser identification.
|
| 22 |
|
| 23 |
```
|