Update README.md
Browse files
README.md
CHANGED
@@ -83,7 +83,7 @@ model = AutoModelForCausalLM.from_pretrained(model_name,device_map="cpu", torch_
|
|
83 |
layer_config = {}
|
84 |
for n, m in model.named_modules():
|
85 |
if isinstance(m, torch.nn.Linear):
|
86 |
-
if "expert" in n
|
87 |
layer_config[n] = {"bits": 4}
|
88 |
print(n, 4)
|
89 |
elif n != "lm_head":
|
|
|
83 |
layer_config = {}
|
84 |
for n, m in model.named_modules():
|
85 |
if isinstance(m, torch.nn.Linear):
|
86 |
+
if "expert" in n and "shared_experts" not in n:
|
87 |
layer_config[n] = {"bits": 4}
|
88 |
print(n, 4)
|
89 |
elif n != "lm_head":
|