NoorNizar commited on
Commit
de4b46d
·
verified ·
1 Parent(s): 5859792

Update model card (via --mco)

Browse files
Files changed (1) hide show
  1. README.md +59 -0
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - llmcompressor
5
+ - quantization
6
+ - wint8
7
+ ---
8
+
9
+ # Meta-Llama-3-8B-Instruct-WINT8
10
+
11
+ This model is a 8-bit quantized version of [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) "using the [llmcompressor](https://github.com/neuralmagic/llmcompressor) library.
12
+
13
+ ## Quantization Details
14
+
15
+ * **Base Model:** [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)
16
+ * **Quantization Library:** `llmcompressor`
17
+ * **Quantization Method:** Weight-only 8-bit int (WINT8)
18
+ * **Quantization Recipe:**
19
+ ```yaml
20
+ quant_stage:
21
+ quant_modifiers:
22
+ QuantizationModifier:
23
+ ignore: [lm_head]
24
+ config_groups:
25
+ group_0:
26
+ weights: {num_bits: 8, type: int, symmetric: true, strategy: channel, dynamic: false}
27
+ targets: [Linear]
28
+ ```
29
+
30
+ ## Evaluation Results
31
+
32
+ The following table shows the evaluation results on various benchmarks compared to the baseline (non-quantized) model.
33
+
34
+ | Task | Baseline Metric (10.0% Threshold) | Quantized Metric | Metric Type |
35
+ |------------------|-------------------------------------------------------|------------------|---------------------|
36
+ | winogrande | 0.7577 | 0.7616 | acc,none |
37
+
38
+ ## How to Use
39
+
40
+ You can load the quantized model and tokenizer using the `transformers` library:
41
+
42
+ ```python
43
+ from transformers import AutoModelForCausalLM, AutoTokenizer
44
+
45
+ model_id = "NoorNizar/Meta-Llama-3-8B-Instruct-WINT8"
46
+
47
+ model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
48
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
49
+
50
+ # Example usage (replace with your specific task)
51
+ prompt = "Hello, world!"
52
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
53
+ outputs = model.generate(**inputs, max_new_tokens=50)
54
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
55
+ ```
56
+
57
+ ## Disclaimer
58
+
59
+ This model was quantized automatically using a script. Performance and behavior might differ slightly from the original base model.