Skip to content

[Bug] ROCm hip_global.cpp Module Error. #3526

Closed

Description

@CarlosR759
  1. Did you update? pip install --upgrade unsloth unsloth_zoo
    Yes, it does create another error which is worse I think:
🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.
[W1029 14:05:37.832849026 OperatorEntry.cpp:218] Warning: Warning only once for all operators,  other operators may also be overridden.
  Overriding a previously registered kernel for the same operator and the same dispatch key
  operator: quantized::embedding_bag_byte_unpack(Tensor weight) -> Tensor
    registered at /pytorch/aten/src/ATen/native/quantized/library.cpp:4
  dispatch key: CUDA
  previous kernel: registered at /pytorch/aten/src/ATen/native/quantized/cpu/qembeddingbag_unpack.cpp:265
       new kernel: registered at /build/python-pytorch/src/pytorch-rocm/aten/src/ATen/native/quantized/hip/EmbeddingBag.hip:566 (function operator())
Key already registered with the same priority: CUDA
[W1029 14:05:38.628794535 AllocatorConfig.cpp:28] Warning: PYTORCH_CUDA_ALLOC_CONF is deprecated, use PYTORCH_ALLOC_CONF instead (function operator())

  1. Number GPUs used, use nvidia-smi
    one AMD RX series
  2. Which Unsloth version, TRL version, transformers version, PyTorch version?
    Pytorch ROCm version, the packages of uv pip venv are below
  3. Which trainer? SFTTrainer, GRPOTrainer etc```python
    SFTT trainer

Hi I'm having errors with using ROCm to run the fine tuning of my code. When unsloth is going to start the fine tuning I just have this error from the current output:

🦥 Unsloth Zoo will now patch everything to make training faster!
You are going to fine tune your model ^^!
Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now.
==((====))==  Unsloth 2025.10.11: Fast Qwen3 patching. Transformers: 4.57.1.
   \\   /|    AMD Radeon Graphics. Num GPUs = 1. Max memory: 15.984 GB. Platform: Linux.
O^O/ \_/ \    Torch: 2.8.0+rocm6.4. ROCm Toolkit: 6.4.43482-0f2d60242. Triton: 3.4.0
\        /    Bfloat16 = TRUE. FA [Xformers = None. FA2 = False]
 "-____-"     Free license: http://github.com/unslothai/unsloth
Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.23s/it]
Unsloth: Will map <|im_end|> to EOS = <|im_end|>.
Unsloth 2025.10.11 patched 36 layers with 36 QKV layers, 36 O layers and 36 MLP layers.
Model device: cuda:0
num_proc must be <= 1. Reducing num_proc to 1 for dataset of size 1.
[datasets.arrow_dataset|WARNING]num_proc must be <= 1. Reducing num_proc to 1 for dataset of size 1.
num_proc must be <= 1. Reducing num_proc to 1 for dataset of size 1.
[datasets.arrow_dataset|WARNING]num_proc must be <= 1. Reducing num_proc to 1 for dataset of size 1.
The tokenizer has new PAD/BOS/EOS tokens that differ from the model config and generation config. The model config and generation config were aligned accordingly, being updated with the tokenizer's values. Updated tokens: {'bos_token_id': None}.
The model is already on multiple devices. Skipping the move to device specified in `args`.
==((====))==  Unsloth - 2x faster free finetuning | Num GPUs used = 1
   \\   /|    Num examples = 1 | Num Epochs = 3 | Total steps = 3
O^O/ \_/ \    Batch size per device = 4 | Gradient accumulation steps = 2
\        /    Data Parallel GPUs = 1 | Total batch size (4 x 2 x 1) = 8
 "-____-"     Trainable parameters = 33,030,144 of 4,055,498,240 (0.81% trained)
  0%|                                                                                                                  | 0/3 [00:00<?, ?it/s]
:0:/longer_pathname_so_that_rpms_can_support_packaging_the_debug_info_for_all_os_profiles/src/clr/hipamd/src/hip_global.cpp:158 : 24004827963 us:  Module not initialized

Where the error is basically this:

:0:/longer_pathname_so_that_rpms_can_support_packaging_the_debug_info_for_all_os_profiles/src/clr/hipamd/src/hip_global.cpp:158 : 24004827963 us:  Module not initialized

I installed according to unsloth webpage for AMD GPUs https://docs.unsloth.ai/new/fine-tuning-llms-on-amd-gpus-with-unsloth just by the difference by using uv. So I just setup python 3.13 for my uv environment and install everything with uv pip install "here the things that unsloth documentation says in the order that they say"

After that I made suggestion over here before posting like uv pip install --upgrade unsloth unsloth_zoo, but that changed unsloth with cuda, as you can saw in the beginning of the post.

Before the uv pip install --upgrade unsloth unsloth_zoo this were my packages in my uv environment:

accelerate==1.11.0
aiohappyeyeballs==2.6.1
aiohttp==3.13.2
aiosignal==1.4.0
anyio==4.11.0
attrs==25.4.0
bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl
certifi==2025.10.5
charset-normalizer==3.4.4
datasets==4.3.0
diffusers==0.35.2
dill==0.4.0
docstring-parser==0.17.0
filelock==3.20.0
frozenlist==1.8.0
fsspec==2025.9.0
h11==0.16.0
hf-transfer==0.1.9
hf-xet==1.2.0
httpcore==1.0.9
httpx==0.28.1
huggingface-hub==0.36.0
idna==3.11
importlib-metadata==8.7.0
jinja2==3.1.6
markdown-it-py==4.0.0
markupsafe==3.0.3
mdurl==0.1.2
mpmath==1.3.0
multidict==6.7.0
multiprocess==0.70.16
networkx==3.5
numpy==2.3.4
nvidia-cublas-cu12==12.8.4.1
nvidia-cuda-cupti-cu12==12.8.90
nvidia-cuda-nvrtc-cu12==12.8.93
nvidia-cuda-runtime-cu12==12.8.90
nvidia-cudnn-cu12==9.10.2.21
nvidia-cufft-cu12==11.3.3.83
nvidia-cufile-cu12==1.13.1.3
nvidia-curand-cu12==10.3.9.90
nvidia-cusolver-cu12==11.7.3.90
nvidia-cusparse-cu12==12.5.8.93
nvidia-cusparselt-cu12==0.7.1
nvidia-nccl-cu12==2.27.5
nvidia-nvjitlink-cu12==12.8.93
nvidia-nvshmem-cu12==3.3.20
nvidia-nvtx-cu12==12.8.90
packaging==25.0
pandas==2.3.3
peft==0.17.1
pillow==12.0.0
propcache==0.4.1
protobuf==6.33.0
psutil==7.1.2
pyarrow==22.0.0
pygments==2.19.2
python-dateutil==2.9.0.post0
pytorch-triton-rocm==3.4.0
pytz==2025.2
pyyaml==6.0.3
regex==2025.10.23
requests==2.32.5
rich==14.2.0
safetensors==0.6.2
sentencepiece==0.2.1
setuptools==80.9.0
shtab==1.7.2
six==1.17.0
sniffio==1.3.1
sympy==1.14.0
tokenizers==0.22.1
torch==2.8.0+rocm6.4
torchao==0.13.0+rocm6.4
torchaudio==2.8.0+rocm6.4
torchvision==0.23.0+rocm6.4
tqdm==4.67.1
transformers==4.57.1
triton==3.5.0
trl==0.23.0
typeguard==4.4.4
typing-extensions==4.15.0
tyro==0.9.35
tzdata==2025.2
unsloth @ git+https://github.com/unslothai/unsloth@5314c214d21a387791decc6b0f7715ebd7c1eeb7
unsloth-zoo @ git+https://github.com/unslothai/unsloth-zoo.git@f690a5aaa3eccab272f6b64c990a93a7a64a0b60
urllib3==2.5.0
wheel==0.45.1
xformers==0.0.32.post2
xxhash==3.6.0
yarl==1.22.0
zipp==3.23.0

As you can see, it seems I have all the dependencies needed for work, at least according to this page https://docs.unsloth.ai/get-started/beginner-start-here/unsloth-requirements

Here is the code on which I'm currently working:

from unsloth import FastLanguageModel
import torch
from trl import SFTTrainer, SFTConfig
from unsloth import is_bfloat16_supported
from unsloth.trainer import TrainingArguments
from unsloth.chat_templates import get_chat_template
from datasets import load_dataset
from transformers import EarlyStoppingCallback
from accelerate import Accelerator
import os
import sys

# parameters for unlsoth fine tuning. Change according to your needs. Defaults are okey
max_seq_length = 2048
dtype = None
load_in_4bit = True  # This set Qlora, set to False to enable Lora instead


def main():
    print("You are going to fine tune your model ^^!")

    model, tokenizer = FastLanguageModel.from_pretrained(
        model_name="unsloth/Qwen3-4B-unsloth-bnb-4bit",
        max_seq_length=max_seq_length,
        dtype=dtype,
        load_in_4bit=load_in_4bit,  # enables 4bit cuantization traning
        load_in_8bit=False,  # Set true to enable 8 bits cuantization
        full_finetuning=False,  # Set to true to enable full fine tunning
    )

    # Here we setup the chat template for the tokenizer basically
    tokenizer = get_chat_template(
        tokenizer,
        chat_template="chatml",
    )

    def formatting_prompts_func(examples):
        convos = []
        for messages in examples["messages"]:
            user_msg = next(
                (msg["content"] for msg in messages if msg["role"] == "user"), ""
            )
            assistant_msg = next(
                (msg["content"] for msg in messages if msg["role"] == "assistant"), ""
            )

            convos.append(
                [
                    {"role": "user", "content": user_msg},
                    {"role": "assistant", "content": assistant_msg},
                ]
            )
        texts = [
            tokenizer.decode(
                tokenizer.apply_chat_template(
                    convo, tokenizer=False, add_generation_prompt=False
                )
            )
            for convo in convos
        ]
        return {"text": texts}

    pass

    # data loading
    dataset = load_dataset(
        "json", data_files="data.json", split="train"
    )  # ,split = "train" needed for working with huggingface repos
    dataset = dataset.map(formatting_prompts_func, batched=True)
    

    # LoRA hyperparameters tuning
    model = FastLanguageModel.get_peft_model(
        model,
        r=16,  # Lora Rank value
        target_modules=[
            "q_proj",
            "k_proj",
            "v_proj",
            "o_proj",
            "gate_proj",
            "up_proj",
            "down_proj",
        ],
        lora_alpha=16,  # This should be same as r value or double to more agresive learning
        lora_dropout=0,  # Dropout for [Q]LoRA. Set to 0, change it if you suspect overfitting
        # use_gradient_checkpointing="False",  # True or "unsloth" for very long context
        random_state=3407,  # Seed for ensure deterministic and reproducible runs during training
        use_rslora=False,  # Enables rank stabilized LoRA
        loftq_config=None,  # Enables LoftQ for traning
    )

    model.to("cuda")
    print(f"Model device: {model.device}")

    trainer = SFTTrainer(
        args=SFTConfig(
            fp16_full_eval=True,
            per_device_eval_batch_size=2,
            eval_accumulation_steps=4,
            output_dir="training_checkpoints",  # location for saved checkpoints. Needed for early stopping
            save_strategy="steps",  # we save models ever N steps
            save_steps=10,
            save_total_limit=1,  # Number of checkpoints models being saved. Lower number reduced disk usage
            eval_strategy="steps",
            eval_steps=10,
            load_best_model_at_end=True,  # The best model is get loaded
            metric_for_best_model="eval_loss",  # Loss function for evaluation of best model
            greater_is_better=False,  # Set to false because the code is minimizing the loss function
        ),
        model=model,
        tokenizer=tokenizer,
        train_dataset=dataset,
        eval_dataset=dataset,
    )
    """In the case of the last function we are evaluating with the same data set for
    training. That's should not be the case when you are working
    with production models in which you should test with another
    data set to avoid overfitting the model. This is for knowing how to work with unsloth ^^
    """

    early_stopping_callback = EarlyStoppingCallback(
        early_stopping_patience=10,  # Number of waiting steps if the eval loss doesn't decrease
        early_stopping_threshold=0.03,  # Diffrence between loss function to not trigger the early stopping
    )

    accelerator = Accelerator()
    model, trainer = accelerator.prepare(model, trainer)
    accelerator.wait_for_everyone()
    trainer.train()
    accelerator.end_training()

    model.save_pretrained("lora_model")
    tokenizer.save_pretrained("lora_model")
   
    print("done ^^")


if __name__ == "__main__":
    main()

So in the end as I said before, this is the error:

:0:/longer_pathname_so_that_rpms_can_support_packaging_the_debug_info_for_all_os_profiles/src/clr/hipamd/src/hip_global.cpp:158 : 24004827963 us:  Module not initialized

Any help on this would be so much appreciated ^^

Activity

  1. matthewdouglas commented on Oct 29, 2025

    @matthewdouglas

    Can you let us know what exact GPU you're using?

    python -m torch.utils.collect_env should give us a good amount of info.

    Also the outputs of python -m xformers.info and python -m bitsandbytes could be useful.

  2. CarlosR759 commented on Oct 29, 2025

    @CarlosR759
    Author

    Can you let us know what exact GPU you're using?

    Sure Its a AMD Radeon RX 7600 XT . As you can see from the code I'm using it to learning unsloth and create code that I probably going to use to fine tune some models remotely with nvidia cards ^^

    python -m torch.utils.collect_env should give us a good amount of info.

    Here you have:

    https://paste.ofcode.org/Lryi9J88Q2ykQJjjbcduT4

    Also the outputs of python -m xformers.info and python -m bitsandbytes could be useful.

    python -m xformers.info output:

    xFormers 0.0.32.post2
    memory_efficient_attention.ckF:                    available
    memory_efficient_attention.ckB:                    available
    memory_efficient_attention.ck_splitKF:             available
    memory_efficient_attention.cutlassF-pt:            unavailable
    memory_efficient_attention.cutlassB-pt:            unavailable
    [email protected]:             unavailable
    [email protected]:             unavailable
    [email protected]:             unavailable
    [email protected]:             unavailable
    [email protected]:     unavailable
    memory_efficient_attention.triton_splitKF:         available
    indexing.scaled_index_addF:                        available
    indexing.scaled_index_addB:                        available
    indexing.index_select:                             available
    sp24.sparse24_sparsify_both_ways:                  available
    sp24.sparse24_apply:                               available
    sp24.sparse24_apply_dense_output:                  available
    sp24._sparse24_gemm:                               available
    [email protected]:                 available
    [email protected]:                        available
    swiglu.dual_gemm_silu:                             available
    swiglu.gemm_fused_operand_sum:                     available
    swiglu.fused.p.cpp:                                available
    is_triton_available:                               True
    pytorch.version:                                   2.8.0+rocm6.4
    pytorch.cuda:                                      available
    gpu.compute_capability:                            11.0
    gpu.name:                                          AMD Radeon Graphics
    dcgm_profiler:                                     unavailable
    build.info:                                        available
    build.cuda_version:                                None
    build.hip_version:                                 6.4.43484-123eb5128
    build.python_version:                              3.9.23
    build.torch_version:                               2.8.0+rocm6.4
    build.env.TORCH_CUDA_ARCH_LIST:
    build.env.PYTORCH_ROCM_ARCH:                       None
    build.env.XFORMERS_BUILD_TYPE:                     Release
    build.env.XFORMERS_ENABLE_DEBUG_ASSERTIONS:        None
    build.env.NVCC_FLAGS:                              -allow-unsupported-compiler
    build.env.XFORMERS_PACKAGE_FROM:                   wheel-v0.0.32.post2
    source.privacy:                                    open source
    

    And the python -m bitsandbytes output

    ================ bitsandbytes v0.48.2.dev0 =================
    Platform: Linux-6.12.55-1-lts-x86_64-with-glibc2.42
      libc: glibc-2.42
    Python: 3.12.9
    PyTorch: 2.8.0+rocm6.4
      CUDA: N/A
      HIP: 6.4.43482-0f2d60242
      XPU: N/A
    Related packages:
      accelerate: 1.11.0
      diffusers: 0.35.2
      numpy: 2.3.3
      pip: not found
      peft: 0.17.1
      safetensors: 0.6.2
      transformers: 4.57.1
      triton: 3.5.0
      trl: 0.23.0
    ============================================================
    PyTorch settings found: ROCM_VERSION=64
    Checking that the library is importable and ROCm is callable...
    :0:/longer_pathname_so_that_rpms_can_support_packaging_the_debug_info_for_all_os_profiles/src/clr/hipamd/src/hip_global.cpp:158 : 36822135772 us:  Module not initialized
    Aborted                    (core dumped) python -m bitsandbytes
    

    I made all the pythons -m with source .venv/bin/activate because the flag -m was not recognize by uv python -m.

    As you can see the bitsandbytes log shows a core dumped.

    From the distro hip suggestions: https://wiki.archlinux.org/title/GPGPU#HIP I have the hip-runtime-amd 6.4.4-1 package installed. And from the point 5.1 I have already installed python-pytorch-rocm 2.9.0-2

    So not sure if I lacked some kernel module to work with unsloth. Here in my system I can work with pytorch very well, and also I can do inference with ollama using the amd gpu. So not sure what is happening to be honest.

    So thank you so much for helping ^^

  3. CarlosR759 commented on Oct 29, 2025

    @CarlosR759
    Author

    Hey I had to recreate the environment again to do the latest logs because you I installed the unsloth cuda version at the end. But now I'm being showed another kind of errors:

    🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.
    ========
    Switching to PyTorch attention since your Xformers is broken.
    ========
    
    Unsloth: Xformers does not work in RTX 50X, Blackwell GPUs as of yet. Please build from source via
    
    pip install ninja
    pip install -v --no-build-isolation -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
    
    
    🦥 Unsloth Zoo will now patch everything to make training faster!
    You are going to fine tune your model ^^!
    Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now.
    ==((====))==  Unsloth 2025.10.11: Fast Qwen3 patching. Transformers: 4.57.1.
       \\   /|    AMD Radeon Graphics. Num GPUs = 1. Max memory: 15.984 GB. Platform: Linux.
    O^O/ \_/ \    Torch: 2.8.0+rocm6.4. ROCm Toolkit: 6.4.43482-0f2d60242. Triton: 3.5.0
    \        /    Bfloat16 = TRUE. FA [Xformers = None. FA2 = False]
     "-____-"     Free license: http://github.com/unslothai/unsloth
    Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!
    Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:02<00:00,  1.31s/it]
    Unsloth: Will map <|im_end|> to EOS = <|im_end|>.
    Unsloth 2025.10.11 patched 36 layers with 36 QKV layers, 36 O layers and 36 MLP layers.
    Model device: cuda:0
    num_proc must be <= 1. Reducing num_proc to 1 for dataset of size 1.
    [datasets.arrow_dataset|WARNING]num_proc must be <= 1. Reducing num_proc to 1 for dataset of size 1.
    num_proc must be <= 1. Reducing num_proc to 1 for dataset of size 1.
    [datasets.arrow_dataset|WARNING]num_proc must be <= 1. Reducing num_proc to 1 for dataset of size 1.
    The tokenizer has new PAD/BOS/EOS tokens that differ from the model config and generation config. The model config and generation config were aligned accordingly, being updated with the tokenizer's values. Updated tokens: {'bos_token_id': None}.
    The model is already on multiple devices. Skipping the move to device specified in `args`.
    ==((====))==  Unsloth - 2x faster free finetuning | Num GPUs used = 1
       \\   /|    Num examples = 1 | Num Epochs = 3 | Total steps = 3
    O^O/ \_/ \    Batch size per device = 4 | Gradient accumulation steps = 2
    \        /    Data Parallel GPUs = 1 | Total batch size (4 x 2 x 1) = 8
     "-____-"     Trainable parameters = 33,030,144 of 4,055,498,240 (0.81% trained)
      0%|                                                                                                                                                | 0/3 [00:00<?, ?it/s]Traceback (most recent call last):
      File "~/projects/fineTunning/main.py", line 147, in <module>
        main()
      File "~/projects/fineTunning/main.py", line 135, in main
        trainer.train()
      File "~/projects/fineTunning/unsloth_compiled_cache/UnslothSFTTrainer.py", line 53, in wrapper
        output = f(self, *args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/transformers/trainer.py", line 2325, in train
        return inner_training_loop(
               ^^^^^^^^^^^^^^^^^^^^
      File "<string>", line 330, in _fast_inner_training_loop
      File "~/projects/fineTunning/unsloth_compiled_cache/UnslothSFTTrainer.py", line 1089, in training_step
        return super().training_step(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<string>", line 40, in _unsloth_training_step
      File "~/projects/fineTunning/unsloth_compiled_cache/UnslothSFTTrainer.py", line 1078, in compute_loss
        outputs = super().compute_loss(
                  ^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/unsloth/models/_utils.py", line 1382, in _unsloth_pre_compute_loss
        outputs = self._old_compute_loss(model, inputs, *args, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<string>", line 36, in compute_loss
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1773, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1784, in _call_impl
        return forward_call(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/accelerate/utils/operations.py", line 819, in forward
        return model_forward(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/accelerate/utils/operations.py", line 807, in __call__
        return convert_to_fp32(self.model_forward(*args, **kwargs))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/amp/autocast_mode.py", line 44, in decorate_autocast
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/accelerate/utils/operations.py", line 819, in forward
        return model_forward(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/accelerate/utils/operations.py", line 807, in __call__
        return convert_to_fp32(self.model_forward(*args, **kwargs))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/amp/autocast_mode.py", line 44, in decorate_autocast
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_compile.py", line 53, in inner
        return disable_fn(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py", line 929, in _fn
        return fn(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/unsloth/models/llama.py", line 1352, in PeftModel_fast_forward
        return self.base_model(
               ^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1773, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1784, in _call_impl
        return forward_call(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/peft/tuners/tuners_utils.py", line 222, in forward
        return self.model.forward(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/unsloth/models/llama.py", line 1226, in _CausalLM_fast_forward
        loss = unsloth_fused_ce_loss(
               ^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/unsloth_zoo/fused_losses/cross_entropy_loss.py", line 364, in unsloth_fused_ce_loss
        return apply_autograd_function(UnslothFusedLoss, dict(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/unsloth_zoo/fused_losses/cross_entropy_loss.py", line 41, in apply_autograd_function
        return getattr(autograd, "apply")(*(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/autograd/function.py", line 576, in apply
        return super().apply(*args, **kwargs)  # type: ignore[misc]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/unsloth_zoo/fused_losses/cross_entropy_loss.py", line 304, in forward
        accumulate_chunk(
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py", line 749, in compile_wrapper
        raise e.remove_dynamo_frames() from None  # see TORCHDYNAMO_VERBOSE=1
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_dynamo/output_graph.py", line 1871, in _call_user_compiler
        raise BackendCompilerFailed(
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_dynamo/output_graph.py", line 1846, in _call_user_compiler
        compiled_fn = compiler_fn(gm, example_inputs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/after_dynamo.py", line 150, in __call__
        compiled_gm = compiler_fn(gm, example_inputs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/__init__.py", line 2380, in __call__
        return compile_fx(model_, inputs_, config_patches=self.config)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/compile_fx.py", line 2002, in compile_fx
        return compile_fx(
               ^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/compile_fx.py", line 2418, in compile_fx
        return aot_autograd(
               ^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/common.py", line 109, in __call__
        cg = aot_module_simplified(gm, example_inputs, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py", line 1199, in aot_module_simplified
        compiled_fn = AOTAutogradCache.load(
                      ^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_functorch/_aot_autograd/autograd_cache.py", line 1140, in load
        compiled_fn = dispatch_and_compile()
                      ^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py", line 1184, in dispatch_and_compile
        compiled_fn, _ = create_aot_dispatcher_function(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py", line 576, in create_aot_dispatcher_function
        return _create_aot_dispatcher_function(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py", line 836, in _create_aot_dispatcher_function
        compiled_fn, fw_metadata = compiler_fn(
                                   ^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_functorch/_aot_autograd/jit_compile_runtime_wrappers.py", line 245, in aot_dispatch_base
        compiled_fw = compiler(fw_module, updated_flat_args)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py", line 483, in __call__
        return self.compiler_fn(gm, example_inputs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/compile_fx.py", line 2250, in fw_compiler_base
        return inner_compile(
               ^^^^^^^^^^^^^^
      File "~/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 81, in inner
        return func(*args, **kwds)
               ^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/compile_fx.py", line 745, in compile_fx_inner
        return wrap_compiler_debug(_compile_fx_inner, compiler_name="inductor")(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/after_aot.py", line 124, in debug_wrapper
        inner_compiled_fn = compiler_fn(gm, example_inputs)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/compile_fx.py", line 860, in _compile_fx_inner
        (key_info, cache_info) = FxGraphCache.prepare_key(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/codecache.py", line 1474, in prepare_key
        key, debug_lines = compiled_fx_graph_hash(
                           ^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/codecache.py", line 960, in compiled_fx_graph_hash
        details = FxGraphHashDetails(gm, example_inputs, fx_kwargs, inputs_to_check)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/codecache.py", line 896, in __init__
        self.system_info = CacheBase.get_system()
                           ^^^^^^^^^^^^^^^^^^^^^^
      File "~/projects/fineTunning/.venv/lib/python3.12/site-packages/torch/_inductor/codecache.py", line 205, in get_system
        from triton.compiler.compiler import triton_key
    torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
    ImportError: cannot import name 'triton_key' from 'triton.compiler.compiler' (~/projects/fineTunning/.venv/lib/python3.12/site-packages/triton/compiler/compiler.py)
    
    Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
    
      0%|          | 0/3 [00:02<?, ?it/s]
    
    

    But the bitsandbytes log is giving the same output. The newer package env is this:

    Package             Version
    ------------------- --------------
    accelerate          1.11.0
    aiohappyeyeballs    2.6.1
    aiohttp             3.13.2
    aiosignal           1.4.0
    anyio               4.11.0
    attrs               25.4.0
    bitsandbytes        0.48.2.dev0
    certifi             2025.10.5
    charset-normalizer  3.4.4
    datasets            4.3.0
    diffusers           0.35.2
    dill                0.4.0
    docstring-parser    0.17.0
    filelock            3.19.1
    frozenlist          1.8.0
    fsspec              2025.9.0
    h11                 0.16.0
    hf-transfer         0.1.9
    hf-xet              1.2.0
    httpcore            1.0.9
    httpx               0.28.1
    huggingface-hub     0.36.0
    idna                3.11
    importlib-metadata  8.7.0
    jinja2              3.1.6
    markdown-it-py      4.0.0
    markupsafe          2.1.5
    mdurl               0.1.2
    mpmath              1.3.0
    multidict           6.7.0
    multiprocess        0.70.16
    networkx            3.5
    numpy               2.3.3
    packaging           25.0
    pandas              2.3.3
    peft                0.17.1
    pillow              11.3.0
    propcache           0.4.1
    protobuf            6.33.0
    psutil              7.1.2
    pyarrow             22.0.0
    pygments            2.19.2
    python-dateutil     2.9.0.post0
    pytorch-triton-rocm 3.4.0
    pytz                2025.2
    pyyaml              6.0.3
    regex               2025.10.23
    requests            2.32.5
    rich                14.2.0
    safetensors         0.6.2
    sentencepiece       0.2.1
    setuptools          70.2.0
    shtab               1.7.2
    six                 1.17.0
    sniffio             1.3.1
    sympy               1.14.0
    tokenizers          0.22.1
    torch               2.8.0+rocm6.4
    torchao             0.13.0+rocm6.4
    torchaudio          2.8.0+rocm6.4
    torchvision         0.23.0+rocm6.4
    tqdm                4.67.1
    transformers        4.57.1
    triton              3.5.0
    trl                 0.23.0
    typeguard           4.4.4
    typing-extensions   4.15.0
    tyro                0.9.35
    tzdata              2025.2
    unsloth             2025.10.11
    unsloth-zoo         2025.10.12
    urllib3             2.5.0
    wheel               0.45.1
    xformers            0.0.32.post2
    xxhash              3.6.0
    yarl                1.22.0
    zipp                3.23.0
    

    Which if I'm not wrong is the same as before.

  4. matthewdouglas commented on Oct 29, 2025

    @matthewdouglas

    I can't really speak for xformers, but right now with bitsandbytes we don't build with gfx1102 support (for RX 7600).

    You might be able to get away with setting an env var to pretend it is gfx1100 (RX 7900): HSA_OVERRIDE_GFX_VERSION="11.0.0". I think that would at least fix the crash you see for python -m bitsandbytes.

    As far as the other issue, I'm not really sure, but I do think it's interesting that there's both triton and pytorch-rocm-triton with different versions here.

  5. CarlosR759 commented on Oct 29, 2025

    @CarlosR759
    Author

    you mean doing an

    export HSA_OVERRIDE_GFX_VERSION="11.0.0"
    

    right ?

    So the documentation says that is supported the RX models but doesn't clarify which ones https://docs.unsloth.ai/new/fine-tuning-llms-on-amd-gpus-with-unsloth ? Do you know which ones should work out of the box with unsloth in this case ?

    I'm going to buy a nvidia card, probably a 5060 model. According to the documentation it should work out of the box https://docs.unsloth.ai/basics/fine-tuning-llms-with-blackwell-rtx-50-series-and-unsloth , but can you tell me if that's the case ?

    So i'm going to buy the nvidia card is because I'm more into machine learning and to have a better support and trying being in the state of the art is mandatory for the moment the usage of an nvidia card. I learned a lot with the amd to be honest, but now I'm starting to become more like an machine learning engineer or some weird combination with devops to be honest :P

    But the nvidia card I'm going to have it in december, so for the meantime I really want to advance in coding with the amd one. Do you think I can compile in some way bitsandbytes to have the support for the RX7600 by myself ? Can you help me with that if the overriding of GFX doesn't works ? ^^

  6. CarlosR759 commented on Oct 29, 2025

    @CarlosR759
    Author

    what do you think about this error since it had been changed and this is the last one:

    from triton.compiler.compiler import triton_key
    torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
    ImportError: cannot import name 'triton_key' from 'triton.compiler.compiler' (~/projects/fineTunning/.venv/lib/python3.12/site-packages/triton/compiler/compiler.py)
    
    Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
    
      0%|          | 0/3 [00:01<?, ?it/s]
    

    While I set export TORCHDYNAMO_VERBOSE=1 it doesn't show any new information, but do you think that could be an issue with triton version with the ROCm one as you said before ?

  7. matthewdouglas commented on Oct 29, 2025

    @matthewdouglas

    So the documentation says that is supported the RX models but doesn't clarify which ones

    I can't really speak for the Unsloth side of things, but from the perspective of bitsandbytes we're expecting support for RDNA3 and RDNA4 GPUs on the consumer/workstation side and CDNA2, CDNA3, and CDNA4 on the datacenter side. We don't have all the hardware to fully validate it, but this should include:

    RDNA4

    • gfx1200 / Navi44
      • RX 9060 XT
      • RX 9060
    • gfx1201 / Navi48
      • RX 9070 XT
      • RX 9070
      • RX 9070 GRE
      • Radeon AI PRO R9700

    RDNA3

    • gfx1100 / Navi31
      • RX 7900 XTX
      • RX 7900 XT
      • RX 7900 GRE
      • Radeon PRO W7800
      • Radeon PRO W7900
    • gfx1101 / Navi32
      • RX 7800 XT
      • RX 7700 XT
      • RX 7700
      • Radeon PRO W7700
      • Radeon PRO V710

    Do you think I can compile in some way bitsandbytes to have the support for the RX7600 by myself ? Can you help me with that if the overriding of GFX doesn't works ?

    I think we can try to add it to the bitsandbytes build if it doesn't work otherwise.

    I'm going to buy a nvidia card, probably a 5060 model. According to the documentation it should work out of the box https://docs.unsloth.ai/basics/fine-tuning-llms-with-blackwell-rtx-50-series-and-unsloth , but can you tell me if that's the case ?

    I would not expect there to be much issue with an RTX 5060.

  8. CarlosR759 commented on Oct 30, 2025

    @CarlosR759
    Author

    I can't really speak for the Unsloth side of things, but from the perspective of bitsandbytes we're expecting support for RDNA3 and RDNA4 GPUs on the consumer/workstation side and CDNA2, CDNA3, and CDNA4 on the datacenter side. We don't have all the hardware to fully validate it,

    Thanks, I'm curious why you are expecting support for RDNA3 and RDNA4. What do you need to wait in order to make the implementation ?

    I think we can try to add it to the bitsandbytes build if it doesn't work otherwise.

    Thanks so much for that ^^ . But as you can see the main problem has changed. But do you think is because of bitsandbytes compilation support for my gpu ? You can see that it's a triton bug.

    I would not expect there to be much issue with an RTX 5060.

    Thanks for the info :)

  9. TomPan-1901 commented on Dec 3, 2025

    @TomPan-1901

    I met the same problem with RX 7700 XT, Ubuntu 22.04 on WSL, the program crashes immediately after I called SFTTrainer.train().

    $ python -m torch.utils.collect_env
    Collecting environment information...
    PyTorch version: 2.9.0+rocm6.4
    Is debug build: False
    CUDA used to build PyTorch: N/A
    ROCM used to build PyTorch: 6.4.43484-123eb5128
    
    OS: Ubuntu 22.04.5 LTS (x86_64)
    GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0
    Clang version: Could not collect
    CMake version: version 4.2.0
    Libc version: glibc-2.35
    
    Python version: 3.10.19 (main, Oct 21 2025, 16:43:05) [GCC 11.2.0] (64-bit runtime)
    Python platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
    Is CUDA available: True
    CUDA runtime version: Could not collect
    CUDA_MODULE_LOADING set to: 
    GPU models and configuration: AMD Radeon RX 7700 XT (gfx1101)
    Nvidia driver version: Could not collect
    cuDNN version: Could not collect
    Is XPU available: False
    HIP runtime version: 6.4.43484
    MIOpen runtime version: 3.4.0
    Is XNNPACK available: True
    
    CPU:
    Architecture:                         x86_64
    CPU op-mode(s):                       32-bit, 64-bit
    Address sizes:                        48 bits physical, 48 bits virtual
    Byte Order:                           Little Endian
    CPU(s):                               12
    On-line CPU(s) list:                  0-11
    Vendor ID:                            AuthenticAMD
    Model name:                           AMD Ryzen 5 7600X 6-Core Processor
    CPU family:                           25
    Model:                                97
    Thread(s) per core:                   2
    Core(s) per socket:                   6
    Socket(s):                            1
    Stepping:                             2
    BogoMIPS:                             9382.19
    Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm
    Virtualization:                       AMD-V
    Hypervisor vendor:                    Microsoft
    Virtualization type:                  full
    L1d cache:                            192 KiB (6 instances)
    L1i cache:                            192 KiB (6 instances)
    L2 cache:                             6 MiB (6 instances)
    L3 cache:                             32 MiB (1 instance)
    Vulnerability Gather data sampling:   Not affected
    Vulnerability Itlb multihit:          Not affected
    Vulnerability L1tf:                   Not affected
    Vulnerability Mds:                    Not affected
    Vulnerability Meltdown:               Not affected
    Vulnerability Mmio stale data:        Not affected
    Vulnerability Reg file data sampling: Not affected
    Vulnerability Retbleed:               Not affected
    Vulnerability Spec rstack overflow:   Mitigation; safe RET
    Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp
    Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
    Vulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
    Vulnerability Srbds:                  Not affected
    Vulnerability Tsx async abort:        Not affected
    
    Versions of relevant libraries:
    [pip3] conch-triton-kernels==1.2.1
    [pip3] numpy==2.1.2
    [pip3] pytorch-triton-rocm==3.5.0
    [pip3] torch==2.9.0+rocm6.4
    [pip3] torchao==0.14.1+rocm6.4
    [pip3] torchaudio==2.9.0+rocm6.4
    [pip3] torchvision==0.24.0+rocm6.4
    [pip3] triton==3.4.0
    [conda] conch-triton-kernels                 1.2.1            pypi_0           pypi
    [conda] numpy                                2.1.2            pypi_0           pypi
    [conda] pytorch-triton-rocm                  3.5.0            pypi_0           pypi
    [conda] torch                                2.9.0+rocm6.4    pypi_0           pypi
    [conda] torchao                              0.14.1+rocm6.4   pypi_0           pypi
    [conda] torchaudio                           2.9.0+rocm6.4    pypi_0           pypi
    [conda] torchvision                          0.24.0+rocm6.4   pypi_0           pypi
    [conda] triton                               3.4.0            pypi_0           pypi
    
    $ python -m xformers.info
    xFormers 0.0.33.post1
    memory_efficient_attention.ckF:                    available
    memory_efficient_attention.ckB:                    available
    memory_efficient_attention.ck_splitKF:             available
    memory_efficient_attention.cutlassF-pt:            unavailable
    memory_efficient_attention.cutlassB-pt:            unavailable
    memory_efficient_attention.cutlassF-blackwell:     unavailable
    memory_efficient_attention.cutlassB-blackwell:     unavailable
    [email protected]:             unavailable
    [email protected]:             unavailable
    [email protected]:             unavailable
    [email protected]:             unavailable
    [email protected]:     unavailable
    memory_efficient_attention.triton_splitKF:         available
    indexing.scaled_index_addF:                        available
    indexing.scaled_index_addB:                        available
    indexing.index_select:                             available
    sp24.sparse24_sparsify_both_ways:                  available
    sp24.sparse24_apply:                               available
    sp24.sparse24_apply_dense_output:                  available
    sp24._sparse24_gemm:                               available
    [email protected]:                 available
    [email protected]:                        available
    swiglu.dual_gemm_silu:                             available
    swiglu.gemm_fused_operand_sum:                     available
    swiglu.fused.p.cpp:                                available
    is_triton_available:                               True
    pytorch.version:                                   2.9.0+rocm6.4
    pytorch.cuda:                                      available
    gpu.compute_capability:                            11.0
    gpu.name:                                          AMD Radeon RX 7700 XT
    dcgm_profiler:                                     unavailable
    build.info:                                        available
    build.cuda_version:                                None
    build.hip_version:                                 6.4.43484-123eb5128
    build.python_version:                              3.10.19
    build.torch_version:                               2.9.0+rocm6.4
    build.env.TORCH_CUDA_ARCH_LIST:                    
    build.env.PYTORCH_ROCM_ARCH:                       None
    build.env.XFORMERS_BUILD_TYPE:                     Release
    build.env.XFORMERS_ENABLE_DEBUG_ASSERTIONS:        None
    build.env.NVCC_FLAGS:                              -allow-unsupported-compiler
    build.env.XFORMERS_PACKAGE_FROM:                   wheel-v0.0.33.post1
    source.privacy:                                    open source
    
    $ python -m bitsandbytes
    ================ bitsandbytes v0.49.0.dev0 =================
    Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
      libc: glibc-2.35
    Python: 3.10.19
    PyTorch: 2.9.0+rocm6.4
      CUDA: N/A
      HIP: 6.4.43484-123eb5128
      XPU: N/A
    Related packages:
      accelerate: 1.12.0
      diffusers: 0.35.2
      numpy: 2.1.2
      pip: 25.3
      peft: 0.18.0
      safetensors: 0.7.0
      transformers: 4.57.2
      triton: 3.4.0
      trl: 0.24.0
    ============================================================
    PyTorch settings found: ROCM_VERSION=64
    Checking that the library is importable and ROCm is callable...
    SUCCESS!
    
  10. LeoBorcherding commented on Sep 2, 2026

    @LeoBorcherding
    Collaborator

    Closing this one. There are two different problems in here and both have answers now.

    The Module not initialized crash from hip_global.cpp was bitsandbytes not having code built for gfx1102, which is the RX 7600 XT. @matthewdouglas spotted that above. bitsandbytes ships gfx1102 in its prebuilt ROCm wheels now, so a fresh pip install bitsandbytes should cover that card, and you shouldn't need the HSA_OVERRIDE_GFX_VERSION trick anymore.

    The cannot import name 'triton_key' error is a broken environment rather than a bug. The package list here has triton from PyPI (the NVIDIA one) sitting next to pytorch-triton-rocm. Torch grabs whichever it finds first, and the PyPI one doesn't have that symbol. Uninstall plain triton and keep only pytorch-triton-rocm.

    @TomPan-1901 yours is a different card (RX 7700 XT, gfx1101) and that setup is nine months old now. If it's still happening on current unsloth and ROCm, open a new issue with the traceback and we'll take a look there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions