Closed heyili closed 1 year ago
Hi @heyili,
Just update xturing version with pip install xturing -U
I'm on a 100% fresh install of Ubuntu 22.04.3 LTS on Desktop.
I also followed the instruction and ran:
pip install xturing
However I got the following error:
/usr/lib/python3/dist-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (2.0.4) or chardet (4.0.0) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " [2023-09-06 14:54:47,895] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect) Traceback (most recent call last): File "/home/saturn/MFC_GPT.py", line 1, in <module> from xturing.datasets import InstructionDataset File "/home/saturn/.local/lib/python3.10/site-packages/xturing/__init__.py", line 6, in <module> from .engines import ( File "/home/saturn/.local/lib/python3.10/site-packages/xturing/engines/__init__.py", line 2, in <module> from xturing.engines.bloom_engine import ( File "/home/saturn/.local/lib/python3.10/site-packages/xturing/engines/bloom_engine.py", line 4, in <module> from xturing.engines.causal import CausalEngine, CausalLoraEngine File "/home/saturn/.local/lib/python3.10/site-packages/xturing/engines/causal.py", line 15, in <module> from xturing.engines.lora_engine import ( File "/home/saturn/.local/lib/python3.10/site-packages/xturing/engines/lora_engine/__init__.py", line 1, in <module> from xturing.engines.lora_engine.lora import ( File "/home/saturn/.local/lib/python3.10/site-packages/xturing/engines/lora_engine/lora.py", line 45, in <module> import bitsandbytes as bnb File "/home/saturn/.local/lib/python3.10/site-packages/bitsandbytes/__init__.py", line 6, in <module> from . import cuda_setup, utils, research File "/home/saturn/.local/lib/python3.10/site-packages/bitsandbytes/research/__init__.py", line 1, in <module> from . import nn File "/home/saturn/.local/lib/python3.10/site-packages/bitsandbytes/research/nn/__init__.py", line 1, in <module> from .modules import LinearFP8Mixed, LinearFP8Global File "/home/saturn/.local/lib/python3.10/site-packages/bitsandbytes/research/nn/modules.py", line 8, in <module> from bitsandbytes.optim import GlobalOptimManager File "/home/saturn/.local/lib/python3.10/site-packages/bitsandbytes/optim/__init__.py", line 8, in <module> from .adagrad import Adagrad, Adagrad8bit, Adagrad32bit File "/home/saturn/.local/lib/python3.10/site-packages/bitsandbytes/optim/adagrad.py", line 5, in <module> from bitsandbytes.optim.optimizer import Optimizer1State File "/home/saturn/.local/lib/python3.10/site-packages/bitsandbytes/optim/optimizer.py", line 12, in <module> import bitsandbytes.functional as F File "/home/saturn/.local/lib/python3.10/site-packages/bitsandbytes/functional.py", line 12, in <module> from scipy.stats import norm ModuleNotFoundError: No module named 'scipy
and so I also ran the following command (which "pip install xturning" should probably handle).
pip install scipy
Hi @OpenSourceIronman, Thanks for information, we will check why it is not installed, can you please share what version of xturing and bitsandbytes you have (because as I see error is not from xturing, but from inside of bitsandbytes)? Also code snippet you are using will be very helpful, because in case of custom optimisers, it may require additional libraries.
Running xturing --version
and pip show bitsandbytes
shows that I'm running xturing version 0.1.8 and bitsandbytes version 0.41.1.
The code snippet I'm using is just the getting started example at https://github.com/stochasticai/xTuring/tree/main
# Make the necessary imports
from xturing.datasets import InstructionDataset
from xturing.models import BaseModel
# Load the desired dataset
dataset = InstructionDataset('../llama/alpaca_data')
# Load the desired model
model = BaseModel.create('gpt2')
# Run the Evaluation of the model on the dataset
result = model.evaluate(dataset)
# Print the result
print(f"Perplexity of the evalution: {result}")
Testing on different machines does not reproduce this issue for our library. If issue with bitsandbytes still reproduces you should report it to bitsandbytes . Thanks for using out library, ask if any additional help required.
Hey guys, I'm just starting using Xturing and have some issues installing it. Like in the instruction I first run:
pip install xturing
Then tried with the example:
I am getting this error:
Does someone have similar issues ?
Best regards