Update README.md
Browse files
README.md
CHANGED
@@ -1,65 +1,62 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
-
datasets:
|
4 |
-
- mlabonne/Evol-Instruct-Python-1k
|
5 |
pipeline_tag: text-generation
|
6 |
---
|
7 |
-
# π¦π»
|
8 |
|
9 |
-
π [Article](https://
|
10 |
|
11 |
-
<center><img src="https://
|
12 |
|
13 |
This is a [`codellama/CodeLlama-7b-hf`](https://huggingface.co/codellama/CodeLlama-7b-hf) model fine-tuned using QLoRA (4-bit precision) on the [`mlabonne/Evol-Instruct-Python-1k`](https://huggingface.co/datasets/mlabonne/Evol-Instruct-Python-1k).
|
14 |
|
15 |
## π§ Training
|
16 |
|
17 |
-
It was trained on an
|
18 |
|
19 |
```yaml
|
20 |
-
base_model: codellama/CodeLlama-
|
21 |
-
base_model_config: codellama/CodeLlama-
|
22 |
model_type: LlamaForCausalLM
|
23 |
-
tokenizer_type:
|
24 |
is_llama_derived_model: true
|
25 |
-
hub_model_id:
|
26 |
|
27 |
load_in_8bit: false
|
28 |
load_in_4bit: true
|
29 |
strict: false
|
30 |
|
31 |
datasets:
|
32 |
-
- path:
|
33 |
type: alpaca
|
34 |
dataset_prepared_path: last_run_prepared
|
35 |
-
val_set_size: 0.
|
36 |
output_dir: ./qlora-out
|
37 |
|
38 |
-
|
39 |
-
lora_model_dir:
|
40 |
-
|
41 |
-
sequence_len: 2048
|
42 |
sample_packing: true
|
|
|
43 |
|
|
|
|
|
44 |
lora_r: 32
|
45 |
lora_alpha: 16
|
46 |
lora_dropout: 0.05
|
47 |
-
lora_target_modules:
|
48 |
lora_target_linear: true
|
49 |
lora_fan_in_fan_out:
|
50 |
|
51 |
-
wandb_project:
|
52 |
wandb_entity:
|
53 |
wandb_watch:
|
54 |
wandb_run_id:
|
55 |
wandb_log_model:
|
56 |
|
57 |
-
gradient_accumulation_steps:
|
58 |
-
micro_batch_size:
|
59 |
num_epochs: 3
|
60 |
-
optimizer:
|
61 |
lr_scheduler: cosine
|
62 |
-
learning_rate: 0.
|
63 |
|
64 |
train_on_inputs: false
|
65 |
group_by_length: false
|
@@ -75,9 +72,8 @@ logging_steps: 1
|
|
75 |
xformers_attention:
|
76 |
flash_attention: true
|
77 |
|
78 |
-
warmup_steps:
|
79 |
-
eval_steps:
|
80 |
-
save_strategy: epoch
|
81 |
save_steps:
|
82 |
debug:
|
83 |
deepspeed:
|
@@ -94,7 +90,7 @@ Here are the loss curves:
|
|
94 |
|
95 |
![](https://i.imgur.com/zrBq01N.png)
|
96 |
|
97 |
-
It is mainly designed for
|
98 |
|
99 |
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|
100 |
|
@@ -108,7 +104,7 @@ import transformers
|
|
108 |
import torch
|
109 |
|
110 |
model = "mlabonne/EvolCodeLlama-7b"
|
111 |
-
prompt = "Your
|
112 |
|
113 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
114 |
pipeline = transformers.pipeline(
|
@@ -124,7 +120,7 @@ sequences = pipeline(
|
|
124 |
top_k=10,
|
125 |
num_return_sequences=1,
|
126 |
eos_token_id=tokenizer.eos_token_id,
|
127 |
-
max_length=
|
128 |
)
|
129 |
for seq in sequences:
|
130 |
print(f"Result: {seq['generated_text']}")
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
3 |
pipeline_tag: text-generation
|
4 |
---
|
5 |
+
# π¦π» Safurai-Csharp-34B
|
6 |
|
7 |
+
π [Article](https://www.safurai.com/blog/introducing-safurai-csharp)
|
8 |
|
9 |
+
<center><img src="https://media.discordapp.net/attachments/1071900237414801528/1165927645469478942/mrciffa_A_cartoon_samurai_wearing_a_black_jacket_as_a_chemistry_d4c17e16-567a-41da-9e0e-2902e93def2c.png?ex=6548a1bc&is=65362cbc&hm=5721b5c15d8f97374212970a7d01f17923ef5015d385230b8ae5542fd2d0df21&=&width=1224&height=1224" width="300"></center>
|
10 |
|
11 |
This is a [`codellama/CodeLlama-7b-hf`](https://huggingface.co/codellama/CodeLlama-7b-hf) model fine-tuned using QLoRA (4-bit precision) on the [`mlabonne/Evol-Instruct-Python-1k`](https://huggingface.co/datasets/mlabonne/Evol-Instruct-Python-1k).
|
12 |
|
13 |
## π§ Training
|
14 |
|
15 |
+
It was trained on an in 1h 11m 44s with the following configuration file:
|
16 |
|
17 |
```yaml
|
18 |
+
base_model: codellama/CodeLlama-34b-hf
|
19 |
+
base_model_config: codellama/CodeLlama-34b-hf
|
20 |
model_type: LlamaForCausalLM
|
21 |
+
tokenizer_type: CodeLlamaTokenizer
|
22 |
is_llama_derived_model: true
|
23 |
+
hub_model_id: "Safurai/Evol-csharp-v1"
|
24 |
|
25 |
load_in_8bit: false
|
26 |
load_in_4bit: true
|
27 |
strict: false
|
28 |
|
29 |
datasets:
|
30 |
+
- path: Safurai/EvolInstruct-csharp-16k-13B-Alpaca
|
31 |
type: alpaca
|
32 |
dataset_prepared_path: last_run_prepared
|
33 |
+
val_set_size: 0.01
|
34 |
output_dir: ./qlora-out
|
35 |
|
36 |
+
sequence_len: 4096
|
|
|
|
|
|
|
37 |
sample_packing: true
|
38 |
+
pad_to_sequence_len: true
|
39 |
|
40 |
+
adapter: lora
|
41 |
+
lora_model_dir:
|
42 |
lora_r: 32
|
43 |
lora_alpha: 16
|
44 |
lora_dropout: 0.05
|
|
|
45 |
lora_target_linear: true
|
46 |
lora_fan_in_fan_out:
|
47 |
|
48 |
+
wandb_project: codellama-csharp
|
49 |
wandb_entity:
|
50 |
wandb_watch:
|
51 |
wandb_run_id:
|
52 |
wandb_log_model:
|
53 |
|
54 |
+
gradient_accumulation_steps: 4
|
55 |
+
micro_batch_size: 2
|
56 |
num_epochs: 3
|
57 |
+
optimizer: adamw_bnb_8bit
|
58 |
lr_scheduler: cosine
|
59 |
+
learning_rate: 0.0003
|
60 |
|
61 |
train_on_inputs: false
|
62 |
group_by_length: false
|
|
|
72 |
xformers_attention:
|
73 |
flash_attention: true
|
74 |
|
75 |
+
warmup_steps: 40
|
76 |
+
eval_steps: 40
|
|
|
77 |
save_steps:
|
78 |
debug:
|
79 |
deepspeed:
|
|
|
90 |
|
91 |
![](https://i.imgur.com/zrBq01N.png)
|
92 |
|
93 |
+
It is mainly designed for experimental purposes, not for inference.
|
94 |
|
95 |
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|
96 |
|
|
|
104 |
import torch
|
105 |
|
106 |
model = "mlabonne/EvolCodeLlama-7b"
|
107 |
+
prompt = "Your csharp request"
|
108 |
|
109 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
110 |
pipeline = transformers.pipeline(
|
|
|
120 |
top_k=10,
|
121 |
num_return_sequences=1,
|
122 |
eos_token_id=tokenizer.eos_token_id,
|
123 |
+
max_length=1000,
|
124 |
)
|
125 |
for seq in sequences:
|
126 |
print(f"Result: {seq['generated_text']}")
|