Downloads · 30 days
734
100% of all-time downloads
ilsp/CoRM-182M-top2
CoRM-182M-top2 is a text generation model from ilsp. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Contrastive Routing Mixture-of-Experts (CoRM). Checkpoint for the paper Beyond Magnitude: Contrastive Routing for Modular Mixture-of-Experts.
Downloads · 30 days
734
100% of all-time downloads
All-time downloads
734
Public
Parameters
782M
1.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.6 GB · 100%
From the Hugging Face model README
Contrastive Routing Mixture-of-Experts (CoRM). Checkpoint for the paper Beyond Magnitude: Contrastive Routing for Modular Mixture-of-Experts.
Part of the ilsp/CoRM collection.
| Model | Active Params | Total Params | Routing |
|---|---|---|---|
| CoRM-182M-top2 | 266M | 777M | Top-2 |
| Hidden size | 768 |
| Layers | 12 |
| Attention heads | 12 (4 KV heads, GQA) |
| Intermediate size | 3072 |
| Experts | 8 |
| Experts per token | 2 |
| Vocab size | 51200 |
| Max position embeddings | 1024 |
| Dtype | bfloat16 |
This model uses custom modeling code, so trust_remote_code=True is required.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "ilsp/CoRM-182M-top2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
inputs = tokenizer("The capital of Greece is", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=32)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))