Text Generation
Transformers
Safetensors
English
cma
custom_code
causal-lm
small-language-model
generalist
4k-tokenizer
Instructions to use User01110/CMA-8M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use User01110/CMA-8M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="User01110/CMA-8M", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("User01110/CMA-8M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use User01110/CMA-8M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "User01110/CMA-8M" # 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-8M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/User01110/CMA-8M
- SGLang
How to use User01110/CMA-8M 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-8M" \ --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-8M", "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-8M" \ --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-8M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use User01110/CMA-8M with Docker Model Runner:
docker model run hf.co/User01110/CMA-8M
| { | |
| "step": 40000, | |
| "parameters": 7849161, | |
| "lm_eval_version": "0.4.12", | |
| "num_fewshot": 0, | |
| "leaderboard_accuracy": { | |
| "arc_easy": 0.35353535353535354, | |
| "arc_challenge": 0.23293515358361774, | |
| "hellaswag": 0.2819159529974109, | |
| "piqa": 0.5821545157780196 | |
| }, | |
| "lm_eval_metric_policy": "acc_norm when available, otherwise acc", | |
| "selection_metric": "open_slm_leaderboard_average", | |
| "arithmark_2.0": { | |
| "acc": 0.2912, | |
| "correct": 728, | |
| "total": 2500, | |
| "by_operator_count": { | |
| "1": { | |
| "acc": 0.2848, | |
| "correct": 356, | |
| "total": 1250 | |
| }, | |
| "2": { | |
| "acc": 0.3253333333333333, | |
| "correct": 244, | |
| "total": 750 | |
| }, | |
| "3": { | |
| "acc": 0.256, | |
| "correct": 128, | |
| "total": 500 | |
| } | |
| } | |
| }, | |
| "arc_average": 0.29323525355948565, | |
| "open_slm_leaderboard_average": 0.36212643058372906, | |
| "average_formula": "(hellaswag + mean(arc_easy, arc_challenge) + piqa + arithmark_2.0) / 4", | |
| "validation": { | |
| "loss": 2.9902732021203575, | |
| "perplexity": 19.89111604438146, | |
| "normalized_bpb": 1.3520133424151615, | |
| "tokens": 358911, | |
| "normalized_utf8_bytes": 1145226 | |
| } | |
| } |