Update README.md
Browse files
README.md
CHANGED
@@ -34,7 +34,7 @@ TBD.
|
|
34 |
|
35 |
## 📈 Training curves
|
36 |
|
37 |
-
You can find the experiment on W&B at [this address](https://wandb.ai/dryanfurman/huggingface/runs/
|
38 |
|
39 |
## 💻 Usage
|
40 |
|
@@ -43,9 +43,9 @@ You can find the experiment on W&B at [this address](https://wandb.ai/dryanfurma
|
|
43 |
<summary>Setup</summary>
|
44 |
|
45 |
```python
|
46 |
-
!pip install -qU transformers accelerate
|
47 |
|
48 |
-
from transformers import AutoTokenizer
|
49 |
import transformers
|
50 |
import torch
|
51 |
|
@@ -57,13 +57,6 @@ else:
|
|
57 |
attn_implementation = "eager"
|
58 |
torch_dtype = torch.float16
|
59 |
|
60 |
-
bnb_config = BitsAndBytesConfig(
|
61 |
-
load_in_4bit=True,
|
62 |
-
bnb_4bit_quant_type="nf4",
|
63 |
-
bnb_4bit_compute_dtype=torch_dtype,
|
64 |
-
bnb_4bit_use_double_quant=True,
|
65 |
-
)
|
66 |
-
|
67 |
model = "dfurman/Llama-3-8B-Orpo-v0.1"
|
68 |
|
69 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
@@ -72,7 +65,6 @@ pipeline = transformers.pipeline(
|
|
72 |
model=model,
|
73 |
model_kwargs={
|
74 |
"torch_dtype": torch_dtype,
|
75 |
-
"quantization_config": bnb_config,
|
76 |
"device_map": "auto",
|
77 |
"attn_implementation": attn_implementation,
|
78 |
}
|
|
|
34 |
|
35 |
## 📈 Training curves
|
36 |
|
37 |
+
You can find the experiment on W&B at [this address](https://wandb.ai/dryanfurman/huggingface/runs/uvr916mv?nw=nwuserdryanfurman).
|
38 |
|
39 |
## 💻 Usage
|
40 |
|
|
|
43 |
<summary>Setup</summary>
|
44 |
|
45 |
```python
|
46 |
+
!pip install -qU transformers accelerate
|
47 |
|
48 |
+
from transformers import AutoTokenizer
|
49 |
import transformers
|
50 |
import torch
|
51 |
|
|
|
57 |
attn_implementation = "eager"
|
58 |
torch_dtype = torch.float16
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
model = "dfurman/Llama-3-8B-Orpo-v0.1"
|
61 |
|
62 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
|
|
65 |
model=model,
|
66 |
model_kwargs={
|
67 |
"torch_dtype": torch_dtype,
|
|
|
68 |
"device_map": "auto",
|
69 |
"attn_implementation": attn_implementation,
|
70 |
}
|