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
File size: 679 Bytes
564ee09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | {
"architectures": [
"CMAForCausalLM"
],
"auto_map": {
"AutoConfig": "modeling_cma.CMAConfig",
"AutoModelForCausalLM": "modeling_cma.CMAForCausalLM"
},
"model_type": "cma",
"vocab_size": 260,
"seq_len": 2048,
"max_position_embeddings": 2048,
"n_positions": 2048,
"n_ctx": 2048,
"d_model": 128,
"n_layers": 6,
"n_heads": 4,
"n_kv_heads": 2,
"chunk": 16,
"cma_heads": 2,
"expand": 2,
"cma_identity_prob": 0.9,
"bos_token_id": 1,
"eos_token_id": 2,
"pad_token_id": 0,
"tie_word_embeddings": true,
"safe_serialization": true,
"minimum_torch_version": "2.5",
"torch_dtype": "bfloat16",
"transformers_version": "5.13.0"
} |