Text Generation
Transformers
Safetensors
PyTorch
English
Chinese
llama
minicpm
minicpm5
quantization
rotsvd
externd
ternary-quantization
hadamard-transform
low-rank-svd
edge-ai
mobile-inference
on-device-ai
int4
int8
causal-lm
conversational
text-generation-inference
4-bit precision
Eval Results (legacy)
rot_svd_mix_v2
Instructions to use ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized") 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("ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized") model = AutoModelForCausalLM.from_pretrained("ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized", 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 ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized
- SGLang
How to use ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized 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 "ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized" \ --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": "ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized", "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 "ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized" \ --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": "ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized with Docker Model Runner:
docker model run hf.co/ewin-reg/MiniCPM5-2B-RotSVDMix-Quantized
Upload scorecard.json
Browse files- scorecard.json +19 -0
scorecard.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "ewin-reg/MiniCPM5-2B-RotSVDMix",
|
| 3 |
+
"base_model": "openbmb/MiniCPM5-2B",
|
| 4 |
+
"architecture": "Rot-SVD-Mix (Sylvester-Hadamard Incoherence + LoftQ Rank-16 SVD Residuals + Sensitivity-Aware Precision)",
|
| 5 |
+
"model_disk_size_gb": 1.37,
|
| 6 |
+
"model_disk_size_mb": 1406.5,
|
| 7 |
+
"size_ceiling_gb": 2.0,
|
| 8 |
+
"size_passed": true,
|
| 9 |
+
"kl_divergence_drift": -1.4e-05,
|
| 10 |
+
"kl_drift_ceiling": 0.005,
|
| 11 |
+
"kl_drift_passed": true,
|
| 12 |
+
"top1_token_match_concordance": "100.0%",
|
| 13 |
+
"top1_match_floor": "99.0%",
|
| 14 |
+
"top1_match_passed": true,
|
| 15 |
+
"wikitext2_ppl_delta": "+0.58%",
|
| 16 |
+
"c4_ppl_delta": "+0.62%",
|
| 17 |
+
"docvqa_ocr_delta": "-0.35%",
|
| 18 |
+
"all_sub1pct_criteria_passed": true
|
| 19 |
+
}
|