Skip to content

Commit 7c22d86

Browse files
authored
Added observer type for test_min_max (#1466)
SUMMARY: Added observer type in QuantizationArgs TEST PLAN: Reran the tests: pytest tests/llmcompressor/observers/test_min_max.py ```bash ========================================================= test session starts ========================================================== platform linux -- Python 3.10.12, pytest-8.3.5, pluggy-1.5.0 rootdir: /home/hzhao/llm-compressor configfile: pyproject.toml plugins: anyio-4.9.0, rerunfailures-15.0, mock-3.14.0 collected 5 items tests/llmcompressor/observers/test_min_max.py ..... [100%] ========================================================== 5 passed in 5.15s =========================================================== ``` --------- Signed-off-by: shanjiaz <[email protected]>
1 parent 35855bd commit 7c22d86

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/llmcompressor/observers/test_min_max.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ def make_dummy_g_idx(columns: int, group_size: int) -> torch.Tensor:
3535
def test_min_max_observer(symmetric, expected_scale, expected_zero_point):
3636
tensor = torch.tensor([1, 1, 1, 1, 1])
3737
num_bits = 8
38-
weights = QuantizationArgs(num_bits=num_bits, symmetric=symmetric)
38+
39+
weights = QuantizationArgs(num_bits=num_bits,
40+
symmetric=symmetric,
41+
observer="minmax")
3942

4043
observer = weights.observer
4144
observer = Observer.load_from_registry(observer, quantization_args=weights)

0 commit comments

Comments
 (0)