Instructions to use Cialtion/SimpleTool with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Cialtion/SimpleTool with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Cialtion/SimpleTool")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Cialtion/SimpleTool", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Cialtion/SimpleTool with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Cialtion/SimpleTool" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cialtion/SimpleTool", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Cialtion/SimpleTool
- SGLang
How to use Cialtion/SimpleTool 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 "Cialtion/SimpleTool" \ --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": "Cialtion/SimpleTool", "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 "Cialtion/SimpleTool" \ --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": "Cialtion/SimpleTool", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Cialtion/SimpleTool with Docker Model Runner:
docker model run hf.co/Cialtion/SimpleTool
Delete rt_templates.py with huggingface_hub
Browse files- rt_templates.py +0 -19
rt_templates.py
DELETED
|
@@ -1,19 +0,0 @@
|
|
| 1 |
-
class RTPrompts:
|
| 2 |
-
SYSTEM_PROMPT = (
|
| 3 |
-
"<|im_start|>system\n"
|
| 4 |
-
"You are a multi-head parallel function calling model. \n"
|
| 5 |
-
"## Output Heads\n\n"
|
| 6 |
-
"**Head 0 - <content>**: Natural language response\n"
|
| 7 |
-
"- Format: <content>response text</content>\n\n"
|
| 8 |
-
"**Head 1 - <function>**: Function names to call\n"
|
| 9 |
-
"- Format: <function>name</function>\n\n"
|
| 10 |
-
"**Head 2-7 - <arg1>-<arg6>**: Function arguments by position\n"
|
| 11 |
-
"- Format: <argN>value</argN> \n"
|
| 12 |
-
"- If Unnecessary: <argN><|null|></argN>\n\n"
|
| 13 |
-
"## Available Tools:\n\n{tools_json}\n"
|
| 14 |
-
"<|im_end|>\n"
|
| 15 |
-
)
|
| 16 |
-
|
| 17 |
-
@staticmethod
|
| 18 |
-
def get_query(user_input):
|
| 19 |
-
return f"<|im_start|>user\nenvironment: []\nhistory: []\n\n{user_input}<|im_end|>\n<|im_start|>assistant\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|