Skip to content

Commit 74bb82d

Browse files
committed
Update update_all_notebooks.py
1 parent 7416b84 commit 74bb82d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎update_all_notebooks.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ def update_or_append_pip_install(base_content, package_name, new_install_line):
135135
!pip install unsloth
136136
else:
137137
# Do this only in Colab notebooks! Otherwise use pip install unsloth
138-
import torch; v = re.match(r"[0-9\\.]{3,}", str(torch.__version__)).group(0)
139-
xformers = "xformers==" + ("0.0.32.post2" if v == "2.8.0" else "0.0.29.post3")
138+
import torch; v = re.match(r"[0-9]{1,}\\.[0-9]{1,}", str(torch.__version__)).group(0)
139+
xformers = "xformers==" + ("0.0.33.post1" if v=="2.9" else "0.0.32.post2" if v=="2.8" else "0.0.29.post3")
140140
!pip install --no-deps bitsandbytes accelerate {xformers} peft trl triton cut_cross_entropy unsloth_zoo
141-
!pip install sentencepiece protobuf "datasets>=3.4.1,<4.0.0" "huggingface_hub>=0.34.0" hf_transfer
141+
!pip install sentencepiece protobuf "datasets==4.3.0" "huggingface_hub>=0.34.0" hf_transfer
142142
!pip install --no-deps unsloth
143143
"""
144144
installation_content = update_or_append_pip_install(
@@ -158,7 +158,7 @@ def update_or_append_pip_install(base_content, package_name, new_install_line):
158158
!pip install pip3-autoremove
159159
!pip install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu128
160160
!pip install unsloth
161-
!pip install --upgrade transformers "huggingface_hub>=0.34.0" "datasets>=3.4.1,<4.0.0"
161+
!pip install --upgrade transformers "huggingface_hub>=0.34.0" "datasets==4.3.0"
162162
"""
163163

164164
installation_kaggle_content = update_or_append_pip_install(
@@ -226,7 +226,7 @@ def update_or_append_pip_install(base_content, package_name, new_install_line):
226226
!uv pip install -qqq --upgrade \
227227
unsloth {get_vllm} {get_numpy} {get_pil} torchvision bitsandbytes xformers
228228
!uv pip install -qqq {get_triton}
229-
!uv pip install "huggingface_hub>=0.34.0" "datasets>=3.4.1,<4.0."""
229+
!uv pip install "huggingface_hub>=0.34.0" "datasets==4.3.0"""
230230

231231
installation_grpo_kaggle_content = update_or_append_pip_install(
232232
installation_grpo_kaggle_content,
@@ -283,7 +283,7 @@ def update_or_append_pip_install(base_content, package_name, new_install_line):
283283
!uv pip install -qqq --upgrade \
284284
unsloth {get_vllm} {get_numpy} {get_pil} torchvision bitsandbytes xformers
285285
!uv pip install -qqq {get_triton}
286-
!uv pip install "huggingface_hub>=0.34.0" "datasets>=3.4.1,<4.0.0
286+
!uv pip install "huggingface_hub>=0.34.0" "datasets==4.3.0"
287287
!uv pip install synthetic-data-kit==0.0.3"""
288288
installation_grpo_synthetic_data_content = update_or_append_pip_install(
289289
installation_grpo_synthetic_data_content,
@@ -541,10 +541,10 @@ def update_or_append_pip_install(base_content, package_name, new_install_line):
541541
!pip install unsloth
542542
else:
543543
# Do this only in Colab notebooks! Otherwise use pip install unsloth
544-
import torch; v = re.match(r"[0-9\.]{3,}", str(torch.__version__)).group(0)
545-
xformers = "xformers==" + ("0.0.32.post2" if v == "2.8.0" else "0.0.29.post3")
544+
import torch; v = re.match(r"[0-9]{1,}\\.[0-9]{1,}", str(torch.__version__)).group(0)
545+
xformers = "xformers==" + ("0.0.33.post1" if v=="2.9" else "0.0.32.post2" if v=="2.8" else "0.0.29.post3")
546546
!pip install --no-deps bitsandbytes accelerate {xformers} peft trl triton cut_cross_entropy unsloth_zoo
547-
!pip install sentencepiece protobuf "datasets>=3.4.1,<4.0.0" "huggingface_hub>=0.34.0" hf_transfer
547+
!pip install sentencepiece protobuf "datasets==4.3.0" "huggingface_hub>=0.34.0" hf_transfer
548548
!pip install --no-deps unsloth
549549
!pip install torchao==0.14.0 fbgemm-gpu-genai==1.3.0
550550
!pip install transformers==4.55.4

0 commit comments

Comments
 (0)