Text Generation
Transformers
Safetensors
English
llama
tool-calling
function-calling
agents
qlora
claude-code
conversational
text-generation-inference
Instructions to use saidutta69/MiniCPM5-2B-Supertool with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saidutta69/MiniCPM5-2B-Supertool with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="saidutta69/MiniCPM5-2B-Supertool") 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("saidutta69/MiniCPM5-2B-Supertool") model = AutoModelForCausalLM.from_pretrained("saidutta69/MiniCPM5-2B-Supertool", 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 saidutta69/MiniCPM5-2B-Supertool with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saidutta69/MiniCPM5-2B-Supertool" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saidutta69/MiniCPM5-2B-Supertool", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/saidutta69/MiniCPM5-2B-Supertool
- SGLang
How to use saidutta69/MiniCPM5-2B-Supertool 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 "saidutta69/MiniCPM5-2B-Supertool" \ --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": "saidutta69/MiniCPM5-2B-Supertool", "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 "saidutta69/MiniCPM5-2B-Supertool" \ --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": "saidutta69/MiniCPM5-2B-Supertool", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use saidutta69/MiniCPM5-2B-Supertool with Docker Model Runner:
docker model run hf.co/saidutta69/MiniCPM5-2B-Supertool
Download eval/base.json from saidutta69/MiniCPM5-2B-Supertool: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/saidutta69/MiniCPM5-2B-Supertool/resolve/main/eval/base.json
- Command line
-
hf download hf://saidutta69/MiniCPM5-2B-Supertool/eval/base.json
-
curl -L -o base.json https://huggingface.co/saidutta69/MiniCPM5-2B-Supertool/resolve/main/eval/base.json
1.04 kB
| { | |
| "model": "/root/ff/base", | |
| "adapter": null, | |
| "completion_loss": 1.5691, | |
| "examples_generated": 120, | |
| "generation_seconds": 1928.6, | |
| "parsed_rate": 0.8833, | |
| "name_match_rate": 0.475, | |
| "args_match_rate": 0.3167, | |
| "full_match_rate": 0.0, | |
| "counts": { | |
| "n": 120, | |
| "parsed": 106, | |
| "name_match": 57, | |
| "args_match": 38, | |
| "full_match": 0 | |
| }, | |
| "failures": [ | |
| { | |
| "i": 50, | |
| "reason": "tool_name", | |
| "ref": "ToolSearch", | |
| "got": "Bash" | |
| }, | |
| { | |
| "i": 69, | |
| "reason": "tool_name", | |
| "ref": "Write", | |
| "got": "Bash" | |
| }, | |
| { | |
| "i": 72, | |
| "reason": "tool_name", | |
| "ref": "Write", | |
| "got": "Bash" | |
| }, | |
| { | |
| "i": 63, | |
| "reason": "tool_name", | |
| "ref": "Write", | |
| "got": "Bash" | |
| }, | |
| { | |
| "i": 5, | |
| "reason": "arg_keys", | |
| "ref": [ | |
| "command", | |
| "description" | |
| ], | |
| "got": [ | |
| "command" | |
| ] | |
| }, | |
| { | |
| "i": 65, | |
| "reason": "tool_name", | |
| "ref": "Write", | |
| "got": "Bash" | |
| } | |
| ] | |
| } |