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
Upload llama_cpp.sh with huggingface_hub
Browse files- llama_cpp.sh +48 -0
llama_cpp.sh
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# 定义路径
|
| 4 |
+
LLAMA_CPP_DIR="/inspire/hdd/global_user/shixiaoxin-253107030017/sxx/llama.cpp"
|
| 5 |
+
WORK_DIR=$(pwd)
|
| 6 |
+
OUTPUT_DIR="${WORK_DIR}/gguf_models"
|
| 7 |
+
|
| 8 |
+
# 创建输出目录
|
| 9 |
+
mkdir -p "$OUTPUT_DIR"
|
| 10 |
+
|
| 11 |
+
# 要转换的模型列表
|
| 12 |
+
models=(
|
| 13 |
+
"sft_qwen25_05b"
|
| 14 |
+
"sft_qwen25_14b"
|
| 15 |
+
"sft_qwen25_15b"
|
| 16 |
+
"sft_qwen25_3b"
|
| 17 |
+
"sft_qwen25_7b"
|
| 18 |
+
"sft_qwen3_30b"
|
| 19 |
+
"sft_qwen3_4b"
|
| 20 |
+
)
|
| 21 |
+
|
| 22 |
+
# 批量转换
|
| 23 |
+
for model in "${models[@]}"; do
|
| 24 |
+
echo "=========================================="
|
| 25 |
+
echo "Converting: $model"
|
| 26 |
+
echo "=========================================="
|
| 27 |
+
|
| 28 |
+
input_path="${WORK_DIR}/${model}"
|
| 29 |
+
output_file="${OUTPUT_DIR}/${model}.gguf"
|
| 30 |
+
|
| 31 |
+
if [ -d "$input_path" ]; then
|
| 32 |
+
python "${LLAMA_CPP_DIR}/convert_hf_to_gguf.py" \
|
| 33 |
+
"$input_path" \
|
| 34 |
+
--outfile "$output_file" \
|
| 35 |
+
--outtype f16
|
| 36 |
+
|
| 37 |
+
if [ $? -eq 0 ]; then
|
| 38 |
+
echo "✓ Success: $output_file"
|
| 39 |
+
else
|
| 40 |
+
echo "✗ Failed: $model"
|
| 41 |
+
fi
|
| 42 |
+
else
|
| 43 |
+
echo "✗ Directory not found: $input_path"
|
| 44 |
+
fi
|
| 45 |
+
echo ""
|
| 46 |
+
done
|
| 47 |
+
|
| 48 |
+
echo "Done! Output directory: $OUTPUT_DIR"
|