ekurtic commited on
Commit
0566e03
·
verified ·
1 Parent(s): 42a06be

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -0
README.md CHANGED
@@ -42,6 +42,26 @@ This model was obtained by quantizing weights and activations of [Devstral-Small
42
  This optimization reduces the number of bits used to represent weights and activations from 16 to 8, reducing GPU memory requirements (by approximately 50%).
43
  Weight quantization also reduces disk size requirements by approximately 50%.
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  ## Deployment
47
 
 
42
  This optimization reduces the number of bits used to represent weights and activations from 16 to 8, reducing GPU memory requirements (by approximately 50%).
43
  Weight quantization also reduces disk size requirements by approximately 50%.
44
 
45
+ ## Creation
46
+ <details>
47
+ This model was created with [llm-compressor](https://github.com/vllm-project/llm-compressor) by running the code snippet below.
48
+
49
+ ```python
50
+ from transformers import AutoModelForCausalLM
51
+ from llmcompressor import oneshot
52
+ from llmcompressor.modifiers.quantization import QuantizationModifier
53
+
54
+
55
+ MODEL_ID = "mistralai/Devstral-Small-2507"
56
+ model = AutoModelForCausalLM.from_pretrained(MODEL_ID, torch_dtype="auto")
57
+ recipe = QuantizationModifier(
58
+ targets="Linear", scheme="FP8_DYNAMIC", ignore=["lm_head"]
59
+ )
60
+ oneshot(model=model, recipe=recipe)
61
+ SAVE_DIR = MODEL_ID.rstrip("/").split("/")[-1] + "-FP8-Dynamic"
62
+ model.save_pretrained(SAVE_DIR)
63
+ ```
64
+ </details>
65
 
66
  ## Deployment
67