RLHFlow / Online-RLHF

A recipe for online RLHF.
https://rlhflow.github.io/
312 stars 38 forks source link

numpy version and transformers version #14

Open WayXG opened 1 week ago

WayXG commented 1 week ago

I encounter the following package version related issue when training with Gemma. The solution is to update transformers and downgrade NumPy.

/configuration_auto.py", line 795, in __getitem__
    raise KeyError(key)
KeyError: 'gemma'
 UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
  device: torch.device = torch.device(torch._C._get_default_device()),  # torch.device('cpu'),

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
hendrydong commented 1 week ago

Thanks for pointing out this. We have updated readme and highlighted the issue with numpy 2.0+.