Update README.md
Browse files
README.md
CHANGED
@@ -123,7 +123,7 @@ model_id = "microsoft/Phi-3-mini-128k-instruct"
|
|
123 |
num_samples = 256
|
124 |
max_seq_len = 8192
|
125 |
|
126 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
127 |
|
128 |
max_token_id = len(tokenizer.get_vocab()) - 1
|
129 |
input_ids = [[random.randint(0, max_token_id) for _ in range(max_seq_len)] for _ in range(num_samples)]
|
@@ -149,6 +149,7 @@ oneshot(
|
|
149 |
recipe=recipe,
|
150 |
max_seq_length=max_seq_len,
|
151 |
num_calibration_samples=num_samples,
|
|
|
152 |
)
|
153 |
|
154 |
model.save_pretrained("Phi-3-mini-128k-instruct-quantized.w8a16")
|
|
|
123 |
num_samples = 256
|
124 |
max_seq_len = 8192
|
125 |
|
126 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
127 |
|
128 |
max_token_id = len(tokenizer.get_vocab()) - 1
|
129 |
input_ids = [[random.randint(0, max_token_id) for _ in range(max_seq_len)] for _ in range(num_samples)]
|
|
|
149 |
recipe=recipe,
|
150 |
max_seq_length=max_seq_len,
|
151 |
num_calibration_samples=num_samples,
|
152 |
+
tokenizer=tokenizer,
|
153 |
)
|
154 |
|
155 |
model.save_pretrained("Phi-3-mini-128k-instruct-quantized.w8a16")
|