Vijayendra commited on
Commit
545b199
·
verified ·
1 Parent(s): 19ffaf0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -4,7 +4,19 @@ library_name: peft
4
  ---
5
  How to use :
6
  ```python
 
 
 
 
7
  !pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
 
 
 
 
 
 
 
 
8
  import torch
9
  from transformers import TextStreamer
10
  from unsloth import FastLanguageModel
 
4
  ---
5
  How to use :
6
  ```python
7
+ %%capture
8
+ import torch
9
+ major_version, minor_version = torch.cuda.get_device_capability()
10
+ # Must install separately since Colab has torch 2.2.1, which breaks packages
11
  !pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
12
+ if major_version >= 8:
13
+ # Use this for new GPUs like Ampere, Hopper GPUs (RTX 30xx, RTX 40xx, A100, H100, L40)
14
+ !pip install --no-deps packaging ninja einops flash-attn xformers trl peft accelerate bitsandbytes
15
+ else:
16
+ # Use this for older GPUs (V100, Tesla T4, RTX 20xx)
17
+ !pip install --no-deps xformers trl peft accelerate bitsandbytes
18
+ pass
19
+
20
  import torch
21
  from transformers import TextStreamer
22
  from unsloth import FastLanguageModel