kylesayrs commited on
Commit
f6c4264
·
verified ·
1 Parent(s): 98e9596

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -97,7 +97,7 @@ ds = ds.map(tokenize, remove_columns=ds.column_names)
97
  # Configure the quantization algorithm to run.
98
  recipe = QuantizationModifier(
99
  config_groups={
100
- "attention": QuantizationScheme(
101
  targets=[r"re:.*self_attn\..*"],
102
  **FP8_BLOCK,
103
  ),
@@ -109,6 +109,7 @@ recipe = QuantizationModifier(
109
  ignore=[
110
  r"re:^model\.layers\.[0-2]\..*"
111
  r"re:.*mlp\.gate.*", # not technically necessary
 
112
  r"lm_head",
113
  ],
114
  )
@@ -128,7 +129,7 @@ model.generation_config.top_p = None
128
  SAVE_DIR = (
129
  "/mnt/nvme-data/engine/kylesayrs/"
130
  + model_id.rstrip("/").split("/")[-1]
131
- + "-FP8-NVFP4"
132
  )
133
  model.save_pretrained(SAVE_DIR, save_compressed=True)
134
  tokenizer.save_pretrained(SAVE_DIR)
 
97
  # Configure the quantization algorithm to run.
98
  recipe = QuantizationModifier(
99
  config_groups={
100
+ "attention_shared_experts": QuantizationScheme(
101
  targets=[r"re:.*self_attn\..*"],
102
  **FP8_BLOCK,
103
  ),
 
109
  ignore=[
110
  r"re:^model\.layers\.[0-2]\..*"
111
  r"re:.*mlp\.gate.*", # not technically necessary
112
+ r"re:.*indexer\.weights_proj$", # sensitive to quantization
113
  r"lm_head",
114
  ],
115
  )
 
129
  SAVE_DIR = (
130
  "/mnt/nvme-data/engine/kylesayrs/"
131
  + model_id.rstrip("/").split("/")[-1]
132
+ + "-NVFP4-FP8-fp32scales"
133
  )
134
  model.save_pretrained(SAVE_DIR, save_compressed=True)
135
  tokenizer.save_pretrained(SAVE_DIR)