Text Generation
Transformers
Safetensors
English
cma
custom_code
causal-lm
small-language-model
base-model
byte-level
Instructions to use User01110/CMA-1M-Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use User01110/CMA-1M-Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="User01110/CMA-1M-Mini", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("User01110/CMA-1M-Mini", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use User01110/CMA-1M-Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "User01110/CMA-1M-Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "User01110/CMA-1M-Mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/User01110/CMA-1M-Mini
- SGLang
How to use User01110/CMA-1M-Mini 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 "User01110/CMA-1M-Mini" \ --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": "User01110/CMA-1M-Mini", "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 "User01110/CMA-1M-Mini" \ --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": "User01110/CMA-1M-Mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use User01110/CMA-1M-Mini with Docker Model Runner:
docker model run hf.co/User01110/CMA-1M-Mini
| { | |
| "step": 12000, | |
| "parameters": 958692, | |
| "lm_eval_version": "0.4.12", | |
| "evaluation_dtype": "bfloat16", | |
| "softmax_dtype": "float32", | |
| "evaluation_autocast": false, | |
| "num_fewshot": 0, | |
| "bos_prefix": true, | |
| "leaderboard_accuracy": { | |
| "arc_easy": 0.29292929292929293, | |
| "arc_challenge": 0.2175767918088737, | |
| "hellaswag": 0.29346743676558457, | |
| "piqa": 0.5462459194776932 | |
| }, | |
| "lm_eval_metric_policy": "acc_norm when available, otherwise acc", | |
| "selection_metric": "validation.normalized_bpb (lower is better)", | |
| "arithmark_2.0": { | |
| "acc": 0.2744, | |
| "correct": 686, | |
| "total": 2500, | |
| "by_operator_count": { | |
| "1": { | |
| "acc": 0.2552, | |
| "correct": 319, | |
| "total": 1250 | |
| }, | |
| "2": { | |
| "acc": 0.30666666666666664, | |
| "correct": 230, | |
| "total": 750 | |
| }, | |
| "3": { | |
| "acc": 0.274, | |
| "correct": 137, | |
| "total": 500 | |
| } | |
| } | |
| }, | |
| "arc_average": 0.2552530423690833, | |
| "open_slm_leaderboard_average": 0.34234159965309024, | |
| "average_formula": "(hellaswag + mean(arc_easy, arc_challenge) + piqa + arithmark_2.0) / 4", | |
| "validation": { | |
| "loss": 1.1765458586014317, | |
| "perplexity": 3.2431525260156, | |
| "normalized_bpb": 1.6973968755827331, | |
| "tokens": 1144831, | |
| "normalized_utf8_bytes": 1144831, | |
| "window": 2048, | |
| "stride": 1024 | |
| } | |
| } |