Text Generation
Transformers
Safetensors
corm
mixture-of-experts
Mixture of Experts
custom_code
🇪🇺 Region: EU
Instructions to use ilsp/CoRM-182M-top2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ilsp/CoRM-182M-top2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ilsp/CoRM-182M-top2", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ilsp/CoRM-182M-top2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ilsp/CoRM-182M-top2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ilsp/CoRM-182M-top2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ilsp/CoRM-182M-top2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ilsp/CoRM-182M-top2
- SGLang
How to use ilsp/CoRM-182M-top2 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 "ilsp/CoRM-182M-top2" \ --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": "ilsp/CoRM-182M-top2", "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 "ilsp/CoRM-182M-top2" \ --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": "ilsp/CoRM-182M-top2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ilsp/CoRM-182M-top2 with Docker Model Runner:
docker model run hf.co/ilsp/CoRM-182M-top2
Commit History
19 days ago
-
Update model card
Verified signaturecf485df -
Fix lm_head tying and align config with training
Verified signature- configuration_corm.py: pass `tie_word_embeddings` to `PretrainedConfig.__init__`. It was reset to True, so recent transformers tied `lm_head` to `embed_tokens` and discarded the trained output layer. - config.json: regenerated from the original Megatron checkpoint; `use_dynamic_routing=false`, `top_p=1.0` (as trained), `has_shared_expert=false`; inert shared-expert schedule keys removed. - modeling_corm.py: `routing_temperature` has shape [1], matching the checkpoint. Weights are unchanged. Verified: re-conversion reproduces model.safetensors tensor-for-tensor, and the loss on Megatron's validation tokens matches the paper-evaluation code.37e1a89
-
Remove superseded RIM-named modeling files
Verified signature04311c9 -
Upload config.json with huggingface_hub
Verified signature1e8805f -
Upload __init__.py with huggingface_hub
Verified signature25a677c -
Upload modeling_corm.py with huggingface_hub
Verified signatureb01bd52 -
Upload configuration_corm.py with huggingface_hub
Verified signatureb217b0a
-
Upload README.md with huggingface_hub
Verified signature287c592 -
Upload folder using huggingface_hub
Verified signature309a94a -
initial commit
Verified signatureccec87b