Instructions to use User01110/cma-1M-exp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use User01110/cma-1M-exp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="User01110/cma-1M-exp", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("User01110/cma-1M-exp", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use User01110/cma-1M-exp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "User01110/cma-1M-exp" # 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-exp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/User01110/cma-1M-exp
- SGLang
How to use User01110/cma-1M-exp 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-exp" \ --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-exp", "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-exp" \ --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-exp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use User01110/cma-1M-exp with Docker Model Runner:
docker model run hf.co/User01110/cma-1M-exp
| { | |
| "steps": 50000, | |
| "batch_size": 128, | |
| "grad_accum": 1, | |
| "seq_len": 4096, | |
| "d_model": 96, | |
| "n_layers": 12, | |
| "n_heads": 6, | |
| "n_kv_heads": 2, | |
| "chunk": 8, | |
| "cma_heads": 2, | |
| "expand": 2, | |
| "cma_identity_prob": 0.9, | |
| "lr": 0.0025, | |
| "muon_lr": 0.03, | |
| "muon_momentum": 0.95, | |
| "muon_ns_steps": 5, | |
| "muon_nesterov": true, | |
| "warmup": 750, | |
| "decay_start_frac": 0.5, | |
| "min_lr_ratio": 0.0, | |
| "wd": 0.01, | |
| "grad_clip": 1.0, | |
| "log_every": 5, | |
| "early_eval_step": 1000, | |
| "eval_every": 10000, | |
| "val_batch_size": 32, | |
| "val_batches": 0, | |
| "val_stride": 2048, | |
| "infer_tokens": 512, | |
| "infer_repeat_penalty": 1.2, | |
| "infer_prompt": "The process of photosynthesis", | |
| "lm_eval_tasks": "arc_easy,arc_challenge,hellaswag,piqa", | |
| "lm_eval_batch_size": "auto", | |
| "lm_eval_device": "cuda", | |
| "lm_eval_dtype": "float32", | |
| "lm_eval_softmax_dtype": "float32", | |
| "lm_eval_expected_version": "0.4.12", | |
| "lm_eval_retries": 3, | |
| "lm_eval_export_dir": "cma_1m_byte_lm_eval_hf", | |
| "lm_eval_output_dir": "lm_eval_results_cma_1m_byte", | |
| "arithmark_batch_size": 16, | |
| "arithmark_data_path": "benchmark_cache/arithmark_2.0.jsonl", | |
| "arithmark_force_download": false, | |
| "hf_repo_id": "User01110/cma-1M-exp", | |
| "hf_repo_private": false, | |
| "hub_upload_retries": 3, | |
| "data_seed": 1337, | |
| "shuffle_buffer": 50000, | |
| "tokenize_batch_size": 64, | |
| "compile": true | |
| } |