Text Generation
Transformers
Safetensors
corm
mixture-of-experts
Mixture of Experts
custom_code
🇪🇺 Region: EU
Instructions to use ilsp/CoRM-182M-top1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ilsp/CoRM-182M-top1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ilsp/CoRM-182M-top1", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ilsp/CoRM-182M-top1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ilsp/CoRM-182M-top1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ilsp/CoRM-182M-top1" # 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-top1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ilsp/CoRM-182M-top1
- SGLang
How to use ilsp/CoRM-182M-top1 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-top1" \ --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-top1", "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-top1" \ --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-top1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ilsp/CoRM-182M-top1 with Docker Model Runner:
docker model run hf.co/ilsp/CoRM-182M-top1
Commit History
-
Update model card
Verified signature59ee0f9 -
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.50ae71b
-
Remove superseded RIM-named modeling files
Verified signaturea512a2a -
Upload config.json with huggingface_hub
Verified signature8163080 -
Upload __init__.py with huggingface_hub
Verified signaturee4b4c27 -
Upload modeling_corm.py with huggingface_hub
Verified signature6dd0a8f -
Upload configuration_corm.py with huggingface_hub
Verified signature14ca565
-
Upload README.md with huggingface_hub
Verified signature1ec6289 -
Upload folder using huggingface_hub
Verified signature6cc4b42 -
initial commit
Verified signature0219158