NikolasXir commited on
Commit
0d1d8c6
·
verified ·
1 Parent(s): 5102ed0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - mixture-of-experts
7
+ - moe
8
+ - corm
9
+ ---
10
+
11
+ # CoRM
12
+
13
+ Checkpoints for the paper [Beyond Magnitude: Contrastive Routing for Modular Mixture-of-Experts](https://arxiv.org/abs/2609.01100).
14
+
15
+ | Model | Active Params | Total Params | Routing | Link |
16
+ |---|---|---|---|---|
17
+ | CoRM-182M | 182M | 777M | Top-1 | [link](https://huggingface.co/ilsp/CoRM-182M-top1) |
18
+ | CoRM-182M | 266M | 777M | Top-2 | [link](https://huggingface.co/ilsp/CoRM-182M-top2) |
19
+ | CoRM-469M | 469M | 2.58B | Top-1 | [link](https://huggingface.co/ilsp/CoRM-469M-top1) |
20
+
21
+ ## Usage
22
+
23
+ These models use custom modeling code, so `trust_remote_code=True` is required.
24
+
25
+ ```python
26
+ from transformers import AutoModelForCausalLM, AutoTokenizer
27
+
28
+ model_id = "ilsp/CoRM-182M-top1"
29
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
30
+ model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
31
+
32
+ inputs = tokenizer("The capital of Greece is", return_tensors="pt")
33
+ outputs = model.generate(**inputs, max_new_tokens=32)
34
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
35
+ ```
36
+
37
+ ## Citation
38
+
39
+ <!-- TODO: add BibTeX. -->