Text Generation
Transformers
Safetensors
English
llama
morph-caller
function-calling
conversational
text-generation-inference
Instructions to use Morpheus-Function-Calling/Morph-Caller with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Morpheus-Function-Calling/Morph-Caller with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Morpheus-Function-Calling/Morph-Caller") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Morpheus-Function-Calling/Morph-Caller") model = AutoModelForCausalLM.from_pretrained("Morpheus-Function-Calling/Morph-Caller", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Morpheus-Function-Calling/Morph-Caller with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Morpheus-Function-Calling/Morph-Caller" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Morpheus-Function-Calling/Morph-Caller", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Morpheus-Function-Calling/Morph-Caller
- SGLang
How to use Morpheus-Function-Calling/Morph-Caller 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 "Morpheus-Function-Calling/Morph-Caller" \ --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": "Morpheus-Function-Calling/Morph-Caller", "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 "Morpheus-Function-Calling/Morph-Caller" \ --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": "Morpheus-Function-Calling/Morph-Caller", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Morpheus-Function-Calling/Morph-Caller with Docker Model Runner:
docker model run hf.co/Morpheus-Function-Calling/Morph-Caller
Update tokenizer_config.json
Browse files- tokenizer_config.json +6 -6
tokenizer_config.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
| 38 |
"normalized": false,
|
| 39 |
"rstrip": false,
|
| 40 |
"single_word": false,
|
| 41 |
-
"special":
|
| 42 |
},
|
| 43 |
"128005": {
|
| 44 |
"content": "<tool_response>",
|
|
@@ -46,7 +46,7 @@
|
|
| 46 |
"normalized": false,
|
| 47 |
"rstrip": false,
|
| 48 |
"single_word": false,
|
| 49 |
-
"special":
|
| 50 |
},
|
| 51 |
"128006": {
|
| 52 |
"content": "<|start_header_id|>",
|
|
@@ -70,7 +70,7 @@
|
|
| 70 |
"normalized": false,
|
| 71 |
"rstrip": false,
|
| 72 |
"single_word": false,
|
| 73 |
-
"special":
|
| 74 |
},
|
| 75 |
"128009": {
|
| 76 |
"content": "<|eot_id>",
|
|
@@ -86,7 +86,7 @@
|
|
| 86 |
"normalized": false,
|
| 87 |
"rstrip": false,
|
| 88 |
"single_word": false,
|
| 89 |
-
"special":
|
| 90 |
},
|
| 91 |
"128011": {
|
| 92 |
"content": "</tool_call>",
|
|
@@ -94,7 +94,7 @@
|
|
| 94 |
"normalized": false,
|
| 95 |
"rstrip": false,
|
| 96 |
"single_word": false,
|
| 97 |
-
"special":
|
| 98 |
},
|
| 99 |
"128012": {
|
| 100 |
"content": "</tool_response>",
|
|
@@ -102,7 +102,7 @@
|
|
| 102 |
"normalized": false,
|
| 103 |
"rstrip": false,
|
| 104 |
"single_word": false,
|
| 105 |
-
"special":
|
| 106 |
},
|
| 107 |
"128013": {
|
| 108 |
"content": "<|reserved_special_token_8|>",
|
|
|
|
| 38 |
"normalized": false,
|
| 39 |
"rstrip": false,
|
| 40 |
"single_word": false,
|
| 41 |
+
"special": false
|
| 42 |
},
|
| 43 |
"128005": {
|
| 44 |
"content": "<tool_response>",
|
|
|
|
| 46 |
"normalized": false,
|
| 47 |
"rstrip": false,
|
| 48 |
"single_word": false,
|
| 49 |
+
"special": false
|
| 50 |
},
|
| 51 |
"128006": {
|
| 52 |
"content": "<|start_header_id|>",
|
|
|
|
| 70 |
"normalized": false,
|
| 71 |
"rstrip": false,
|
| 72 |
"single_word": false,
|
| 73 |
+
"special": false
|
| 74 |
},
|
| 75 |
"128009": {
|
| 76 |
"content": "<|eot_id>",
|
|
|
|
| 86 |
"normalized": false,
|
| 87 |
"rstrip": false,
|
| 88 |
"single_word": false,
|
| 89 |
+
"special": false
|
| 90 |
},
|
| 91 |
"128011": {
|
| 92 |
"content": "</tool_call>",
|
|
|
|
| 94 |
"normalized": false,
|
| 95 |
"rstrip": false,
|
| 96 |
"single_word": false,
|
| 97 |
+
"special": false
|
| 98 |
},
|
| 99 |
"128012": {
|
| 100 |
"content": "</tool_response>",
|
|
|
|
| 102 |
"normalized": false,
|
| 103 |
"rstrip": false,
|
| 104 |
"single_word": false,
|
| 105 |
+
"special": false
|
| 106 |
},
|
| 107 |
"128013": {
|
| 108 |
"content": "<|reserved_special_token_8|>",
|