1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[GH-ISSUE #274] Not work gpt-oss-20b in AMD GPS #156

Closed
opened 2026-11-01 04:18:06 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @tanreinama on GitHub (Apr 4, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/274

It doesn't seem to work with AMD GPUs. I don't know why. I used the official rocm/pytorch container, so Pytorch should be compatible.

Dockerfile.rocm:

FROM rocm/pytorch:rocm7.2.1_ubuntu24.04_py3.12_pytorch_release_2.9.1
RUN pip install heretic-llm==1.2.0
CMD ["/bin/sh", "-c", "heretic openai/gpt-oss-20b"]

Running log:

$ docker build -f Dockerfile.rocm ./ -t hereticrun
$ docker run -it --rm -it --network=host --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined hereticrun:latest
█░█░█▀▀░█▀▄░█▀▀░▀█▀░█░█▀▀  v1.2.0
█▀█░█▀▀░█▀▄░█▀▀░░█░░█░█░░
▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀▀▀  https://github.com/p-e-w/heretic

Detected 1 CUDA device(s):
* GPU 0: AMD Radeon AI PRO R9700
...
Loading model openai/gpt-oss-20b...
tokenizer_config.json: 4.20kB [00:00, 30.4MB/s]
tokenizer.json: 100%|██████████████████████████████████████████████| 27.9M/27.9M [00:01<00:00, 22.9MB/s]
special_tokens_map.json: 100%|███████████████████████████████████████| 98.0/98.0 [00:00<00:00, 1.20MB/s]
chat_template.jinja: 16.7kB [00:00, 104MB/s]
config.json: 1.81kB [00:00, 18.2MB/s]
model.safetensors.index.json: 36.4kB [00:00, 190MB/s]
model-00002-of-00002.safetensors: 100%|████████████████████████████| 4.17G/4.17G [01:49<00:00, 38.1MB/s]
model-00000-of-00002.safetensors: 100%|████████████████████████████| 4.79G/4.79G [03:01<00:00, 26.4MB/s]
model-00001-of-00002.safetensors: 100%|████████████████████████████| 4.80G/4.80G [03:07<00:00, 25.7MB/s]
* 400 prompts loaded

Determining optimal batch size...
* Trying batch size 1...
...
Failed (at 193:37:
        else:
            mask_k = offs_k < k
            mask_k_w = offs_w_k < ((k // W_K_DIVISOR) * W_K_MULTIPLIER)
            if is_w_microscaled and SWIZZLE_MX_SCALE is None:
                mask_k_scale = offs_k_scale * MX_PACK_DIVISOR < k
            if is_x_microscaled:
                mask_x_k_scale = offs_x_k_scale * MX_PACK_DIVISOR < k

        x = tl.load(XPtrs, mask=mask_k[None, :], other=0.0)
        w = tl.load(WPtrs, mask=mask_k_w[:, None], other=0.0, cache_modifier=W_CACHE_MODIFIER)
        if is_w_microscaled:
            x_format: tl.constexpr = get_scaled_dot_format_string(x.dtype)
                                     ^
triton.language.float32)
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/venv/bin/heretic:6 in <module>                                                              │
│                                                                                                  │
│   3 from heretic.main import main                                                                │
│   4 if __name__ == '__main__':                                                                   │
│   5 │   sys.argv[0] = sys.argv[0].removesuffix('.exe')                                           │
│ ❱ 6 │   sys.exit(main())                                                                         │
│   7                                                                                              │
│                                                                                                  │
│ /opt/venv/lib/python3.12/site-packages/heretic/main.py:891 in main                               │
│                                                                                                  │
│   888 │   install()                                                                              │
│   889 │                                                                                          │
│   890 │   try:                                                                                   │
│ ❱ 891 │   │   run()                                                                              │
│   892 │   except BaseException as error:                                                         │
│   893 │   │   # Transformers appears to handle KeyboardInterrupt (or BaseException)              │
│   894 │   │   # internally in some places, which can re-raise a different error in the handler   │
│                                                                                                  │
│ /opt/venv/lib/python3.12/site-packages/heretic/main.py:312 in run                                │
│                                                                                                  │
│   309 │   │   elif choice is None or choice == "":                                               │
│   310 │   │   │   return                                                                         │
│   311 │                                                                                          │
│ ❱ 312 │   model = Model(settings)                                                                │
│   313 │   print()                                                                                │
│   314 │   print_memory_usage()                                                                   │
│   315                                                                                            │
│                                                                                                  │
│ /opt/venv/lib/python3.12/site-packages/heretic/model.py:145 in __init__                          │
│                                                                                                  │
│   142 │   │   │   break                                                                          │
│   143 │   │                                                                                      │
│   144 │   │   if self.model is None:                                                             │
│ ❱ 145 │   │   │   raise Exception("Failed to load model with all configured dtypes.")            │
│   146 │   │                                                                                      │
│   147 │   │   self._apply_lora()                                                                 │
│   148                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
Exception: Failed to load model with all configured dtypes.
Originally created by @tanreinama on GitHub (Apr 4, 2026). Original GitHub issue: https://github.com/p-e-w/heretic/issues/274 It doesn't seem to work with AMD GPUs. I don't know why. I used the official rocm/pytorch container, so Pytorch should be compatible. Dockerfile.rocm: ``` FROM rocm/pytorch:rocm7.2.1_ubuntu24.04_py3.12_pytorch_release_2.9.1 RUN pip install heretic-llm==1.2.0 CMD ["/bin/sh", "-c", "heretic openai/gpt-oss-20b"] ``` Running log: ``` $ docker build -f Dockerfile.rocm ./ -t hereticrun $ docker run -it --rm -it --network=host --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined hereticrun:latest █░█░█▀▀░█▀▄░█▀▀░▀█▀░█░█▀▀ v1.2.0 █▀█░█▀▀░█▀▄░█▀▀░░█░░█░█░░ ▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀▀▀ https://github.com/p-e-w/heretic Detected 1 CUDA device(s): * GPU 0: AMD Radeon AI PRO R9700 ... Loading model openai/gpt-oss-20b... tokenizer_config.json: 4.20kB [00:00, 30.4MB/s] tokenizer.json: 100%|██████████████████████████████████████████████| 27.9M/27.9M [00:01<00:00, 22.9MB/s] special_tokens_map.json: 100%|███████████████████████████████████████| 98.0/98.0 [00:00<00:00, 1.20MB/s] chat_template.jinja: 16.7kB [00:00, 104MB/s] config.json: 1.81kB [00:00, 18.2MB/s] model.safetensors.index.json: 36.4kB [00:00, 190MB/s] model-00002-of-00002.safetensors: 100%|████████████████████████████| 4.17G/4.17G [01:49<00:00, 38.1MB/s] model-00000-of-00002.safetensors: 100%|████████████████████████████| 4.79G/4.79G [03:01<00:00, 26.4MB/s] model-00001-of-00002.safetensors: 100%|████████████████████████████| 4.80G/4.80G [03:07<00:00, 25.7MB/s] * 400 prompts loaded Determining optimal batch size... * Trying batch size 1... ... Failed (at 193:37: else: mask_k = offs_k < k mask_k_w = offs_w_k < ((k // W_K_DIVISOR) * W_K_MULTIPLIER) if is_w_microscaled and SWIZZLE_MX_SCALE is None: mask_k_scale = offs_k_scale * MX_PACK_DIVISOR < k if is_x_microscaled: mask_x_k_scale = offs_x_k_scale * MX_PACK_DIVISOR < k x = tl.load(XPtrs, mask=mask_k[None, :], other=0.0) w = tl.load(WPtrs, mask=mask_k_w[:, None], other=0.0, cache_modifier=W_CACHE_MODIFIER) if is_w_microscaled: x_format: tl.constexpr = get_scaled_dot_format_string(x.dtype) ^ triton.language.float32) ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /opt/venv/bin/heretic:6 in <module> │ │ │ │ 3 from heretic.main import main │ │ 4 if __name__ == '__main__': │ │ 5 │ sys.argv[0] = sys.argv[0].removesuffix('.exe') │ │ ❱ 6 │ sys.exit(main()) │ │ 7 │ │ │ │ /opt/venv/lib/python3.12/site-packages/heretic/main.py:891 in main │ │ │ │ 888 │ install() │ │ 889 │ │ │ 890 │ try: │ │ ❱ 891 │ │ run() │ │ 892 │ except BaseException as error: │ │ 893 │ │ # Transformers appears to handle KeyboardInterrupt (or BaseException) │ │ 894 │ │ # internally in some places, which can re-raise a different error in the handler │ │ │ │ /opt/venv/lib/python3.12/site-packages/heretic/main.py:312 in run │ │ │ │ 309 │ │ elif choice is None or choice == "": │ │ 310 │ │ │ return │ │ 311 │ │ │ ❱ 312 │ model = Model(settings) │ │ 313 │ print() │ │ 314 │ print_memory_usage() │ │ 315 │ │ │ │ /opt/venv/lib/python3.12/site-packages/heretic/model.py:145 in __init__ │ │ │ │ 142 │ │ │ break │ │ 143 │ │ │ │ 144 │ │ if self.model is None: │ │ ❱ 145 │ │ │ raise Exception("Failed to load model with all configured dtypes.") │ │ 146 │ │ │ │ 147 │ │ self._apply_lora() │ │ 148 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ Exception: Failed to load model with all configured dtypes. ```
Author
Owner

@p-e-w commented on GitHub (Apr 4, 2026):

Try updating Triton and see if it fixes the issue.

<!-- gh-comment-id:4186354322 --> @p-e-w commented on GitHub (Apr 4, 2026): Try updating Triton and see if it fixes the issue.
Author
Owner

@p-e-w commented on GitHub (Apr 4, 2026):

Do other models work? gpt-oss models use native MXFP4, so operator support is the most likely root cause.

<!-- gh-comment-id:4186356818 --> @p-e-w commented on GitHub (Apr 4, 2026): Do other models work? gpt-oss models use native MXFP4, so operator support is the most likely root cause.
Author
Owner

@tanreinama commented on GitHub (Apr 4, 2026):

Thx for responce.

Updating Triton had no effect. Both the nightly builds of triton_rocm-3.6.0 and triton_rocm-3.7.0 result in errors (though the error types are slightly different).

However, it works fine when run with Qwen/Qwen3-0.6B.

This appears to be a problem specific to openai/gpt-oss-20b.

Running log:

"""""""""""""
update triton to 3.6.0 nightry
"""""""""""""
$ pip list|grep triton
triton             3.5.1+rocm7.2.1.gita272dfa8
$ pip install -U https://download-r2.pytorch.org/whl/nightly/triton_rocm-3.6.0%2Bgit6213a0e8-cp312-cp312-linux_x86_64.whl


"""""""""""""
run heretic
"""""""""""""
$ heretic openai/gpt-oss-20b
█░█░█▀▀░█▀▄░█▀▀░▀█▀░█░█▀▀  v1.2.0
█▀█░█▀▀░█▀▄░█▀▀░░█░░█░█░░
▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀▀▀  https://github.com/p-e-w/heretic

Detected 1 CUDA device(s):
* GPU 0: AMD Radeon AI PRO R9700

Loading model openai/gpt-oss-20b...
tokenizer_config.json: 4.20kB [00:00, 23.6MB/s]
tokenizer.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 27.9M/27.9M [00:03<00:00, 9.22MB/s]
special_tokens_map.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 98.0/98.0 [00:00<00:00, 1.54MB/s]
chat_template.jinja: 16.7kB [00:00, 79.1MB/s]
config.json: 1.81kB [00:00, 16.6MB/s]
model.safetensors.index.json: 36.4kB [00:00, 151MB/s]
model-00002-of-00002.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████| 4.17G/4.17G [02:02<00:00, 34.0MB/s]
model-00000-of-00002.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████| 4.79G/4.79G [02:58<00:00, 26.9MB/s]
model-00001-of-00002.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████| 4.80G/4.80G [03:06<00:00, 25.7MB/s]
Fetching 3 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [03:07<00:00, 62.47s/it]
_ops.py: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 201/201 [00:00<00:00, 2.15MB/s]
__init__.cpython-312.pyc: 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<00:00, 3.93MB/s]
__init__.py: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 363/363 [00:00<00:00, 6.11MB/s]
matmul_ogs.py: 30.0kB [00:00, 136MB/s]                                                                                           | 1/41 [00:00<00:07,  5.47it/s]
_finalize_matmul.py: 16.0kB [00:00, 94.3MB/s]
_masked_compaction.py: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 814/814 [00:00<00:00, 14.1MB/s]
_common.py: 6.85kB [00:00, 11.0MB/s]
compaction.py: 2.54kB [00:00, 26.1MB/s]                                                                                               | 0.00/814 [00:00<?, ?B/s]
opt_flags.py: 13.2kB [00:00, 89.4MB/s]                                                                                           | 4/41 [00:00<00:02, 13.06it/s]
_p_matmul_ogs.py: 23.8kB [00:00, 114MB/s]
_matmul_ogs.py: 22.2kB [00:00, 100MB/s]
opt_flags_amd.py: 1.07kB [00:00, 5.89MB/s]
opt_flags_intel.py: 1.25kB [00:00, 14.5MB/s]██████████▍                                                                         | 12/41 [00:00<00:00, 31.63it/s]
numerics.py: 1.02kB [00:00, 4.60MB/s]s]
opt_flags_nvidia.py: 4.26kB [00:00, 21.5MB/s]
mxfp.py: 14.5kB [00:00, 29.5MB/s], ?B/s]
_downcast_to_mxfp.py: 8.19kB [00:00, 31.8MB/s]
flexpoint.py: 6.99kB [00:00, 51.6MB/s]/s]
_upcast_from_mxfp.py: 6.55kB [00:00, 47.3MB/s]█████████████████████                                                             | 17/41 [00:00<00:00, 36.30it/s]
routing.py: 15.5kB [00:00, 79.4MB/s]?B/s]
reduce_bitmatrix.py: 4.07kB [00:00, 48.5MB/s]
proton_opts.py: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 456/456 [00:00<00:00, 7.81MB/s]
_expt_data.py: 2.06kB [00:00, 23.8MB/s]                                                                                               | 0.00/456 [00:00<?, ?B/s]
_routing_compute.py: 6.51kB [00:00, 53.2MB/s]███████████████████████████████████████▉                                           | 24/41 [00:00<00:00, 44.09it/s]
specialize.py: 4.54kB [00:00, 35.2MB/s]]
swiglu.py: 3.20kB [00:00, 42.6MB/s]
_swiglu.py: 4.46kB [00:00, 24.6MB/s]
tensor.py: 7.22kB [00:00, 29.6MB/s]
target_info.py: 2.56kB [00:00, 27.5MB/s]
layout.py: 1.04kB [00:00, 10.8MB/s]██████████████████████████████████████████████████████████████▌                              | 29/41 [00:00<00:00, 39.88it/s]
base.py: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 352/352 [00:00<00:00, 6.13MB/s]
blackwell_scale.py: 2.37kB [00:00, 25.3MB/s]                                                                                          | 0.00/352 [00:00<?, ?B/s]
hopper_scale.py: 3.06kB [00:00, 32.8MB/s]
hopper_value.py: 11.7kB [00:00, 77.2MB/s]
strided.py: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 337/337 [00:00<00:00, 5.70MB/s]
testing.py: 7.72kB [00:00, 56.7MB/s]                                                                                                  | 0.00/337 [00:00<?, ?B/s]
topk.py: 3.72kB [00:00, 39.5MB/s]
_topk_backward.py: 1.21kB [00:00, 12.4MB/s]
_topk_forward.py: 5.71kB [00:00, 46.9MB/s]███████████████████████████████████████████████████████████████████████████████████▍  | 40/41 [00:01<00:00, 45.40it/s]
Fetching 41 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:01<00:00, 37.44it/s]
Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 11255.09it/s]
HW Exception by GPU node-1 (Agent handle: 0x1fadfc90) reason :GPU Hang                                                                   | 0/41 [00:00<?, ?it/s]


"""""""""""""
update triton to 3.7.0 nightry
"""""""""""""
$ pip install -U https://download-r2.pytorch.org/whl/nightly/triton_rocm-3.7.0%2Bgit9c288bc5-cp312-cp312-linux_x86_64.whl


"""""""""""""
run heretic
"""""""""""""
$ heretic openai/gpt-oss-20b
█░█░█▀▀░█▀▄░█▀▀░▀█▀░█░█▀▀  v1.2.0
█▀█░█▀▀░█▀▄░█▀▀░░█░░█░█░░
▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀▀▀  https://github.com/p-e-w/heretic

Detected 1 CUDA device(s):
* GPU 0: AMD Radeon AI PRO R9700

Loading model openai/gpt-oss-20b...
Fetching 41 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 5981.86it/s]
Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 18955.74it/s]
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:14<00:00,  4.75s/it]
generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 177/177 [00:00<00:00, 299kB/s]
Failed (unsupported operand type(s) for *: 'NoneType' and 'int')
Fetching 41 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 5715.45it/s]
Fetching 41 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 6282.57it/s]
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:12<00:00,  4.17s/it]
Failed (unsupported operand type(s) for *: 'NoneType' and 'int')
Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 11516.64it/s]
Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 76091.36it/s]
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:12<00:00,  4.33s/it]
Failed (unsupported operand type(s) for *: 'NoneType' and 'int')
Fetching 41 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 9007.72it/s]
Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 10755.30it/s]
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:14<00:00,  4.84s/it]
Failed (at 193:37:
        else:
            mask_k = offs_k < k
            mask_k_w = offs_w_k < ((k // W_K_DIVISOR) * W_K_MULTIPLIER)
            if is_w_microscaled and SWIZZLE_MX_SCALE is None:
                mask_k_scale = offs_k_scale * MX_PACK_DIVISOR < k
            if is_x_microscaled:
                mask_x_k_scale = offs_x_k_scale * MX_PACK_DIVISOR < k

        x = tl.load(XPtrs, mask=mask_k[None, :], other=0.0)
        w = tl.load(WPtrs, mask=mask_k_w[:, None], other=0.0, cache_modifier=W_CACHE_MODIFIER)
        if is_w_microscaled:
            x_format: tl.constexpr = get_scaled_dot_format_string(x.dtype)
                                     ^
triton.language.float32)
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/venv/bin/heretic:6 in <module>                                                              │
│                                                                                                  │
│   3 from heretic.main import main                                                                │
│   4 if __name__ == '__main__':                                                                   │
│   5 │   sys.argv[0] = sys.argv[0].removesuffix('.exe')                                           │
│ ❱ 6 │   sys.exit(main())                                                                         │
│   7                                                                                              │
│                                                                                                  │
│ /opt/venv/lib/python3.12/site-packages/heretic/main.py:891 in main                               │
│                                                                                                  │
│   888 │   install()                                                                              │
│   889 │                                                                                          │
│   890 │   try:                                                                                   │
│ ❱ 891 │   │   run()                                                                              │
│   892 │   except BaseException as error:                                                         │
│   893 │   │   # Transformers appears to handle KeyboardInterrupt (or BaseException)              │
│   894 │   │   # internally in some places, which can re-raise a different error in the handler   │
│                                                                                                  │
│ /opt/venv/lib/python3.12/site-packages/heretic/main.py:312 in run                                │
│                                                                                                  │
│   309 │   │   elif choice is None or choice == "":                                               │
│   310 │   │   │   return                                                                         │
│   311 │                                                                                          │
│ ❱ 312 │   model = Model(settings)                                                                │
│   313 │   print()                                                                                │
│   314 │   print_memory_usage()                                                                   │
│   315                                                                                            │
│                                                                                                  │
│ /opt/venv/lib/python3.12/site-packages/heretic/model.py:145 in __init__                          │
│                                                                                                  │
│   142 │   │   │   break                                                                          │
│   143 │   │                                                                                      │
│   144 │   │   if self.model is None:                                                             │
│ ❱ 145 │   │   │   raise Exception("Failed to load model with all configured dtypes.")            │
│   146 │   │                                                                                      │
│   147 │   │   self._apply_lora()                                                                 │
│   148                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
Exception: Failed to load model with all configured dtypes.


"""""""""""""
run heretic
"""""""""""""
$ heretic Qwen/Qwen3-0.6B
█░█░█▀▀░█▀▄░█▀▀░▀█▀░█░█▀▀  v1.2.0
█▀█░█▀▀░█▀▄░█▀▀░░█░░█░█░░
▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀▀▀  https://github.com/p-e-w/heretic

Detected 1 CUDA device(s):
* GPU 0: AMD Radeon AI PRO R9700

Loading model Qwen/Qwen3-0.6B...
tokenizer_config.json: 9.73kB [00:00, 12.2MB/s]
vocab.json: 2.78MB [00:00, 69.3MB/s]
merges.txt: 1.67MB [00:00, 85.8MB/s]
tokenizer.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4M/11.4M [00:01<00:00, 9.34MB/s]
config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 726/726 [00:00<00:00, 4.10MB/s]
model.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 1.50G/1.50G [00:16<00:00, 90.5MB/s]
generation_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 239/239 [00:00<00:00, 1.24MB/s]
Ok
* LoRA adapters initialized (targets: o_proj, down_proj)
* Transformer model with 28 layers
* Abliterable components:
  * attn.o_proj: 1 modules per layer
  * mlp.down_proj: 1 modules per layer

Resident system RAM: 1.94 GB
Allocated GPU VRAM: 1.19 GB
Reserved GPU VRAM: 1.41 GB

Loading good prompts from mlabonne/harmless_alpaca...
README.md: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 388/388 [00:00<00:00, 4.34MB/s]
data/train-00000-of-00001.parquet: 100%|█████████████████████████████████████████████████████████████████████████████████████| 972k/972k [00:00<00:00, 2.37MB/s]
data/test-00000-of-00001.parquet: 100%|███████████████████████████████████████████████████████████████████████████████████████| 243k/243k [00:00<00:00, 585kB/s]
Generating train split: 100%|█████████████████████████████████████████████████████████████████████████████████| 25058/25058 [00:00<00:00, 1331469.41 examples/s]
Generating test split: 100%|█████████████████████████████████████████████████████████████████████████████████████| 6265/6265 [00:00<00:00, 773294.33 examples/s]
* 400 prompts loaded

Loading bad prompts from mlabonne/harmful_behaviors...
README.md: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 381/381 [00:00<00:00, 532kB/s]
data/train-00000-of-00001.parquet: 100%|███████████████████████████████████████████████████████████████████████████████████| 15.0k/15.0k [00:00<00:00, 36.1kB/s]
data/test-00000-of-00001.parquet: 100%|████████████████████████████████████████████████████████████████████████████████████| 5.46k/5.46k [00:00<00:00, 12.9kB/s]
Generating train split: 100%|██████████████████████████████████████████████████████████████████████████████████████| 416/416 [00:00<00:00, 159826.92 examples/s]
Generating test split: 100%|███████████████████████████████████████████████████████████████████████████████████████| 104/104 [00:00<00:00, 108105.98 examples/s]
* 400 prompts loaded

Determining optimal batch size...
* Trying batch size 1... Ok (25 tokens/s)
* Trying batch size 2... /opt/venv/lib/python3.12/site-packages/transformers/integrations/sdpa_attention.py:96: UserWarning: Using AOTriton backend for Efficient Attention forward... (Triggered internally at /pytorch/aten/src/ATen/native/transformers/hip/attention.hip:1452.)
  attn_output = torch.nn.functional.scaled_dot_product_attention(
Ok (41 tokens/s)
* Trying batch size 4... Ok (79 tokens/s)
* Trying batch size 8... Ok (150 tokens/s)
* Trying batch size 16... Ok (318 tokens/s)
* Trying batch size 32... Ok (639 tokens/s)
* Trying batch size 64... Ok (1243 tokens/s)
* Trying batch size 128... Ok (2154 tokens/s)
* Chosen batch size: 128

Checking for common response prefix...
* Prefix found: '<think></think>'

Loading good evaluation prompts from mlabonne/harmless_alpaca...
* 100 prompts loaded
* Obtaining first-token probability distributions...

Loading bad evaluation prompts from mlabonne/harmful_behaviors...
* 100 prompts loaded
* Counting model refusals...
* Initial refusals: 53/100

Calculating per-layer refusal directions...
* Obtaining residuals for good prompts...
* Obtaining residuals for bad prompts...

Running trial 1 of 200...
* Parameters:
  * direction_index = 17.56
  * attn.o_proj.max_weight = 1.42
  * attn.o_proj.max_weight_position = 21.43
  * attn.o_proj.min_weight = 0.55
  * attn.o_proj.min_weight_distance = 7.37
  * mlp.down_proj.max_weight = 1.45
  * mlp.down_proj.max_weight_position = 16.98
  * mlp.down_proj.min_weight = 0.95
  * mlp.down_proj.min_weight_distance = 9.23
* Resetting model...
* Abliterating...
* Evaluating...
  * Obtaining first-token probability distributions...
  * KL divergence: 0.0005
  * Counting model refusals...

<!-- gh-comment-id:4186585094 --> @tanreinama commented on GitHub (Apr 4, 2026): Thx for responce. Updating Triton had no effect. Both the nightly builds of triton_rocm-3.6.0 and triton_rocm-3.7.0 result in errors (though the error types are slightly different). However, it works fine when run with Qwen/Qwen3-0.6B. This appears to be a problem specific to openai/gpt-oss-20b. Running log: ``` """"""""""""" update triton to 3.6.0 nightry """"""""""""" $ pip list|grep triton triton 3.5.1+rocm7.2.1.gita272dfa8 $ pip install -U https://download-r2.pytorch.org/whl/nightly/triton_rocm-3.6.0%2Bgit6213a0e8-cp312-cp312-linux_x86_64.whl """"""""""""" run heretic """"""""""""" $ heretic openai/gpt-oss-20b █░█░█▀▀░█▀▄░█▀▀░▀█▀░█░█▀▀ v1.2.0 █▀█░█▀▀░█▀▄░█▀▀░░█░░█░█░░ ▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀▀▀ https://github.com/p-e-w/heretic Detected 1 CUDA device(s): * GPU 0: AMD Radeon AI PRO R9700 Loading model openai/gpt-oss-20b... tokenizer_config.json: 4.20kB [00:00, 23.6MB/s] tokenizer.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 27.9M/27.9M [00:03<00:00, 9.22MB/s] special_tokens_map.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 98.0/98.0 [00:00<00:00, 1.54MB/s] chat_template.jinja: 16.7kB [00:00, 79.1MB/s] config.json: 1.81kB [00:00, 16.6MB/s] model.safetensors.index.json: 36.4kB [00:00, 151MB/s] model-00002-of-00002.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████| 4.17G/4.17G [02:02<00:00, 34.0MB/s] model-00000-of-00002.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████| 4.79G/4.79G [02:58<00:00, 26.9MB/s] model-00001-of-00002.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████| 4.80G/4.80G [03:06<00:00, 25.7MB/s] Fetching 3 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [03:07<00:00, 62.47s/it] _ops.py: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 201/201 [00:00<00:00, 2.15MB/s] __init__.cpython-312.pyc: 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<00:00, 3.93MB/s] __init__.py: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 363/363 [00:00<00:00, 6.11MB/s] matmul_ogs.py: 30.0kB [00:00, 136MB/s] | 1/41 [00:00<00:07, 5.47it/s] _finalize_matmul.py: 16.0kB [00:00, 94.3MB/s] _masked_compaction.py: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 814/814 [00:00<00:00, 14.1MB/s] _common.py: 6.85kB [00:00, 11.0MB/s] compaction.py: 2.54kB [00:00, 26.1MB/s] | 0.00/814 [00:00<?, ?B/s] opt_flags.py: 13.2kB [00:00, 89.4MB/s] | 4/41 [00:00<00:02, 13.06it/s] _p_matmul_ogs.py: 23.8kB [00:00, 114MB/s] _matmul_ogs.py: 22.2kB [00:00, 100MB/s] opt_flags_amd.py: 1.07kB [00:00, 5.89MB/s] opt_flags_intel.py: 1.25kB [00:00, 14.5MB/s]██████████▍ | 12/41 [00:00<00:00, 31.63it/s] numerics.py: 1.02kB [00:00, 4.60MB/s]s] opt_flags_nvidia.py: 4.26kB [00:00, 21.5MB/s] mxfp.py: 14.5kB [00:00, 29.5MB/s], ?B/s] _downcast_to_mxfp.py: 8.19kB [00:00, 31.8MB/s] flexpoint.py: 6.99kB [00:00, 51.6MB/s]/s] _upcast_from_mxfp.py: 6.55kB [00:00, 47.3MB/s]█████████████████████ | 17/41 [00:00<00:00, 36.30it/s] routing.py: 15.5kB [00:00, 79.4MB/s]?B/s] reduce_bitmatrix.py: 4.07kB [00:00, 48.5MB/s] proton_opts.py: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 456/456 [00:00<00:00, 7.81MB/s] _expt_data.py: 2.06kB [00:00, 23.8MB/s] | 0.00/456 [00:00<?, ?B/s] _routing_compute.py: 6.51kB [00:00, 53.2MB/s]███████████████████████████████████████▉ | 24/41 [00:00<00:00, 44.09it/s] specialize.py: 4.54kB [00:00, 35.2MB/s]] swiglu.py: 3.20kB [00:00, 42.6MB/s] _swiglu.py: 4.46kB [00:00, 24.6MB/s] tensor.py: 7.22kB [00:00, 29.6MB/s] target_info.py: 2.56kB [00:00, 27.5MB/s] layout.py: 1.04kB [00:00, 10.8MB/s]██████████████████████████████████████████████████████████████▌ | 29/41 [00:00<00:00, 39.88it/s] base.py: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 352/352 [00:00<00:00, 6.13MB/s] blackwell_scale.py: 2.37kB [00:00, 25.3MB/s] | 0.00/352 [00:00<?, ?B/s] hopper_scale.py: 3.06kB [00:00, 32.8MB/s] hopper_value.py: 11.7kB [00:00, 77.2MB/s] strided.py: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 337/337 [00:00<00:00, 5.70MB/s] testing.py: 7.72kB [00:00, 56.7MB/s] | 0.00/337 [00:00<?, ?B/s] topk.py: 3.72kB [00:00, 39.5MB/s] _topk_backward.py: 1.21kB [00:00, 12.4MB/s] _topk_forward.py: 5.71kB [00:00, 46.9MB/s]███████████████████████████████████████████████████████████████████████████████████▍ | 40/41 [00:01<00:00, 45.40it/s] Fetching 41 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:01<00:00, 37.44it/s] Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 11255.09it/s] HW Exception by GPU node-1 (Agent handle: 0x1fadfc90) reason :GPU Hang | 0/41 [00:00<?, ?it/s] """"""""""""" update triton to 3.7.0 nightry """"""""""""" $ pip install -U https://download-r2.pytorch.org/whl/nightly/triton_rocm-3.7.0%2Bgit9c288bc5-cp312-cp312-linux_x86_64.whl """"""""""""" run heretic """"""""""""" $ heretic openai/gpt-oss-20b █░█░█▀▀░█▀▄░█▀▀░▀█▀░█░█▀▀ v1.2.0 █▀█░█▀▀░█▀▄░█▀▀░░█░░█░█░░ ▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀▀▀ https://github.com/p-e-w/heretic Detected 1 CUDA device(s): * GPU 0: AMD Radeon AI PRO R9700 Loading model openai/gpt-oss-20b... Fetching 41 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 5981.86it/s] Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 18955.74it/s] Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:14<00:00, 4.75s/it] generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 177/177 [00:00<00:00, 299kB/s] Failed (unsupported operand type(s) for *: 'NoneType' and 'int') Fetching 41 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 5715.45it/s] Fetching 41 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 6282.57it/s] Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:12<00:00, 4.17s/it] Failed (unsupported operand type(s) for *: 'NoneType' and 'int') Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 11516.64it/s] Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 76091.36it/s] Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:12<00:00, 4.33s/it] Failed (unsupported operand type(s) for *: 'NoneType' and 'int') Fetching 41 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 9007.72it/s] Fetching 41 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 41/41 [00:00<00:00, 10755.30it/s] Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:14<00:00, 4.84s/it] Failed (at 193:37: else: mask_k = offs_k < k mask_k_w = offs_w_k < ((k // W_K_DIVISOR) * W_K_MULTIPLIER) if is_w_microscaled and SWIZZLE_MX_SCALE is None: mask_k_scale = offs_k_scale * MX_PACK_DIVISOR < k if is_x_microscaled: mask_x_k_scale = offs_x_k_scale * MX_PACK_DIVISOR < k x = tl.load(XPtrs, mask=mask_k[None, :], other=0.0) w = tl.load(WPtrs, mask=mask_k_w[:, None], other=0.0, cache_modifier=W_CACHE_MODIFIER) if is_w_microscaled: x_format: tl.constexpr = get_scaled_dot_format_string(x.dtype) ^ triton.language.float32) ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /opt/venv/bin/heretic:6 in <module> │ │ │ │ 3 from heretic.main import main │ │ 4 if __name__ == '__main__': │ │ 5 │ sys.argv[0] = sys.argv[0].removesuffix('.exe') │ │ ❱ 6 │ sys.exit(main()) │ │ 7 │ │ │ │ /opt/venv/lib/python3.12/site-packages/heretic/main.py:891 in main │ │ │ │ 888 │ install() │ │ 889 │ │ │ 890 │ try: │ │ ❱ 891 │ │ run() │ │ 892 │ except BaseException as error: │ │ 893 │ │ # Transformers appears to handle KeyboardInterrupt (or BaseException) │ │ 894 │ │ # internally in some places, which can re-raise a different error in the handler │ │ │ │ /opt/venv/lib/python3.12/site-packages/heretic/main.py:312 in run │ │ │ │ 309 │ │ elif choice is None or choice == "": │ │ 310 │ │ │ return │ │ 311 │ │ │ ❱ 312 │ model = Model(settings) │ │ 313 │ print() │ │ 314 │ print_memory_usage() │ │ 315 │ │ │ │ /opt/venv/lib/python3.12/site-packages/heretic/model.py:145 in __init__ │ │ │ │ 142 │ │ │ break │ │ 143 │ │ │ │ 144 │ │ if self.model is None: │ │ ❱ 145 │ │ │ raise Exception("Failed to load model with all configured dtypes.") │ │ 146 │ │ │ │ 147 │ │ self._apply_lora() │ │ 148 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ Exception: Failed to load model with all configured dtypes. """"""""""""" run heretic """"""""""""" $ heretic Qwen/Qwen3-0.6B █░█░█▀▀░█▀▄░█▀▀░▀█▀░█░█▀▀ v1.2.0 █▀█░█▀▀░█▀▄░█▀▀░░█░░█░█░░ ▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀▀▀ https://github.com/p-e-w/heretic Detected 1 CUDA device(s): * GPU 0: AMD Radeon AI PRO R9700 Loading model Qwen/Qwen3-0.6B... tokenizer_config.json: 9.73kB [00:00, 12.2MB/s] vocab.json: 2.78MB [00:00, 69.3MB/s] merges.txt: 1.67MB [00:00, 85.8MB/s] tokenizer.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4M/11.4M [00:01<00:00, 9.34MB/s] config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 726/726 [00:00<00:00, 4.10MB/s] model.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 1.50G/1.50G [00:16<00:00, 90.5MB/s] generation_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 239/239 [00:00<00:00, 1.24MB/s] Ok * LoRA adapters initialized (targets: o_proj, down_proj) * Transformer model with 28 layers * Abliterable components: * attn.o_proj: 1 modules per layer * mlp.down_proj: 1 modules per layer Resident system RAM: 1.94 GB Allocated GPU VRAM: 1.19 GB Reserved GPU VRAM: 1.41 GB Loading good prompts from mlabonne/harmless_alpaca... README.md: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 388/388 [00:00<00:00, 4.34MB/s] data/train-00000-of-00001.parquet: 100%|█████████████████████████████████████████████████████████████████████████████████████| 972k/972k [00:00<00:00, 2.37MB/s] data/test-00000-of-00001.parquet: 100%|███████████████████████████████████████████████████████████████████████████████████████| 243k/243k [00:00<00:00, 585kB/s] Generating train split: 100%|█████████████████████████████████████████████████████████████████████████████████| 25058/25058 [00:00<00:00, 1331469.41 examples/s] Generating test split: 100%|█████████████████████████████████████████████████████████████████████████████████████| 6265/6265 [00:00<00:00, 773294.33 examples/s] * 400 prompts loaded Loading bad prompts from mlabonne/harmful_behaviors... README.md: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 381/381 [00:00<00:00, 532kB/s] data/train-00000-of-00001.parquet: 100%|███████████████████████████████████████████████████████████████████████████████████| 15.0k/15.0k [00:00<00:00, 36.1kB/s] data/test-00000-of-00001.parquet: 100%|████████████████████████████████████████████████████████████████████████████████████| 5.46k/5.46k [00:00<00:00, 12.9kB/s] Generating train split: 100%|██████████████████████████████████████████████████████████████████████████████████████| 416/416 [00:00<00:00, 159826.92 examples/s] Generating test split: 100%|███████████████████████████████████████████████████████████████████████████████████████| 104/104 [00:00<00:00, 108105.98 examples/s] * 400 prompts loaded Determining optimal batch size... * Trying batch size 1... Ok (25 tokens/s) * Trying batch size 2... /opt/venv/lib/python3.12/site-packages/transformers/integrations/sdpa_attention.py:96: UserWarning: Using AOTriton backend for Efficient Attention forward... (Triggered internally at /pytorch/aten/src/ATen/native/transformers/hip/attention.hip:1452.) attn_output = torch.nn.functional.scaled_dot_product_attention( Ok (41 tokens/s) * Trying batch size 4... Ok (79 tokens/s) * Trying batch size 8... Ok (150 tokens/s) * Trying batch size 16... Ok (318 tokens/s) * Trying batch size 32... Ok (639 tokens/s) * Trying batch size 64... Ok (1243 tokens/s) * Trying batch size 128... Ok (2154 tokens/s) * Chosen batch size: 128 Checking for common response prefix... * Prefix found: '<think></think>' Loading good evaluation prompts from mlabonne/harmless_alpaca... * 100 prompts loaded * Obtaining first-token probability distributions... Loading bad evaluation prompts from mlabonne/harmful_behaviors... * 100 prompts loaded * Counting model refusals... * Initial refusals: 53/100 Calculating per-layer refusal directions... * Obtaining residuals for good prompts... * Obtaining residuals for bad prompts... Running trial 1 of 200... * Parameters: * direction_index = 17.56 * attn.o_proj.max_weight = 1.42 * attn.o_proj.max_weight_position = 21.43 * attn.o_proj.min_weight = 0.55 * attn.o_proj.min_weight_distance = 7.37 * mlp.down_proj.max_weight = 1.45 * mlp.down_proj.max_weight_position = 16.98 * mlp.down_proj.min_weight = 0.95 * mlp.down_proj.min_weight_distance = 9.23 * Resetting model... * Abliterating... * Evaluating... * Obtaining first-token probability distributions... * KL divergence: 0.0005 * Counting model refusals... ```
Author
Owner

@tanreinama commented on GitHub (Apr 4, 2026):

OK. I found there is no heretic issue.
The transformers sample already contains an error. I will close this issue and post it to the transformers section.

>>> from transformers import pipeline
>>> import torch
>>> model_id = "openai/gpt-oss-20b"
>>> pipe = pipeline(
... "text-generation",
... model=model_id,
... torch_dtype="auto",
... device_map="auto",
... )
`torch_dtype` is deprecated! Use `dtype` instead!
Fetching 42 files: 42/42 [00:02<00:00, 16.72it/s]
Download complete: 100 percent| 101/101 [00:02<00:00, 39.0B/s]
Loading weights: 100%| 411/411 [01:16<00:00, 5.40it/s]
>>> messages = [
... {"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
... ]
>>> outputs = pipe(
... messages,
... max_new_tokens=256,
...) 

File "/home/nama/.cache/huggingface/hub/models--kernels-community--gpt-oss-triton-kernels/snapshots/76c23fb9a6607cd5c62c1e6b8e7f436ec5385517/build/torch-rocm/matmul_ogs.py", line 583, in matmul_ogs 
out = apply_postprocessing_features(scatter_indx, finalize_scatter_idxs, opt_flags, expt_token_offs_raw, 
num_indx, precision_config, routing_data, 
postprocessing_features, memory, fused_postprocess_activation, epilogue) 
File "/home/nama/.cache/huggingface/hub/models--kernels-community--gpt-oss-triton-kernels/snapshots/76c23fb9a6607cd5c62c1e6b8e7f436ec5385517/build/torch-rocm/matmul_ogs.py", line 252, in apply_postprocessing_features 
grid, (BLOCK_N, num_warps) = sorted([(compute_grid(*c), c) for c in candidates], key=lambda x: x[0][1])[0] 
~~~~~~~~~~~~^^^^ 
File "/home/nama/.cache/huggingface/hub/models--kernels-community--gpt-oss-triton-kernels/snapshots/76c23fb9a6607cd5c62c1e6b8e7f436ec5385517/build/torch-rocm/matmul_ogs.py", line 223, in compute_grid 
num_pid = target_info.num_sms() * (warps_per_sm // num_warps) 
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
<!-- gh-comment-id:4186623589 --> @tanreinama commented on GitHub (Apr 4, 2026): OK. I found there is no heretic issue. The transformers sample already contains an error. I will close this issue and post it to the transformers section. ```` >>> from transformers import pipeline >>> import torch >>> model_id = "openai/gpt-oss-20b" >>> pipe = pipeline( ... "text-generation", ... model=model_id, ... torch_dtype="auto", ... device_map="auto", ... ) `torch_dtype` is deprecated! Use `dtype` instead! Fetching 42 files: 42/42 [00:02<00:00, 16.72it/s] Download complete: 100 percent| 101/101 [00:02<00:00, 39.0B/s] Loading weights: 100%| 411/411 [01:16<00:00, 5.40it/s] >>> messages = [ ... {"role": "user", "content": "Explain quantum mechanics clearly and concisely."}, ... ] >>> outputs = pipe( ... messages, ... max_new_tokens=256, ...) File "/home/nama/.cache/huggingface/hub/models--kernels-community--gpt-oss-triton-kernels/snapshots/76c23fb9a6607cd5c62c1e6b8e7f436ec5385517/build/torch-rocm/matmul_ogs.py", line 583, in matmul_ogs out = apply_postprocessing_features(scatter_indx, finalize_scatter_idxs, opt_flags, expt_token_offs_raw, num_indx, precision_config, routing_data, postprocessing_features, memory, fused_postprocess_activation, epilogue) File "/home/nama/.cache/huggingface/hub/models--kernels-community--gpt-oss-triton-kernels/snapshots/76c23fb9a6607cd5c62c1e6b8e7f436ec5385517/build/torch-rocm/matmul_ogs.py", line 252, in apply_postprocessing_features grid, (BLOCK_N, num_warps) = sorted([(compute_grid(*c), c) for c in candidates], key=lambda x: x[0][1])[0] ~~~~~~~~~~~~^^^^ File "/home/nama/.cache/huggingface/hub/models--kernels-community--gpt-oss-triton-kernels/snapshots/76c23fb9a6607cd5c62c1e6b8e7f436ec5385517/build/torch-rocm/matmul_ogs.py", line 223, in compute_grid num_pid = target_info.num_sms() * (warps_per_sm // num_warps) ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' ````
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#156
No description provided.