Commit
•
360bf72
1
Parent(s):
4437aa5
Update README.md
Browse files
README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
---
|
2 |
-
base_model:
|
3 |
datasets:
|
4 |
- mwitiderrick/AlpacaCode
|
5 |
inference: true
|
6 |
model_type: llama
|
7 |
prompt_template: |
|
8 |
-
|
9 |
{prompt}
|
10 |
-
|
11 |
created_by: mwitiderrick
|
12 |
tags:
|
13 |
- transformers
|
@@ -28,7 +28,7 @@ model-index:
|
|
28 |
metrics:
|
29 |
- name: hellaswag(0-Shot)
|
30 |
type: hellaswag (0-Shot)
|
31 |
-
value: 0.
|
32 |
- task:
|
33 |
type: text-generation
|
34 |
dataset:
|
@@ -37,7 +37,7 @@ model-index:
|
|
37 |
metrics:
|
38 |
- name: winogrande(0-Shot)
|
39 |
type: winogrande (0-Shot)
|
40 |
-
value: 0.
|
41 |
|
42 |
- task:
|
43 |
type: text-generation
|
@@ -47,7 +47,7 @@ model-index:
|
|
47 |
metrics:
|
48 |
- name: arc_challenge(0-Shot)
|
49 |
type: arc_challenge (0-Shot)
|
50 |
-
value: 0.
|
51 |
source:
|
52 |
name: open_llama_3b_instruct_v_0.2 model card
|
53 |
url: https://huggingface.co/mwitiderrick/open_llama_3b_instruct_v_0.2
|
@@ -56,69 +56,30 @@ model-index:
|
|
56 |
---
|
57 |
# OpenLLaMA Code Instruct: An Open Reproduction of LLaMA
|
58 |
|
59 |
-
This is an [OpenLlama model](https://huggingface.co/
|
60 |
-
[
|
61 |
|
62 |
## Prompt Template
|
63 |
```
|
64 |
-
|
65 |
|
66 |
-
{query}
|
67 |
-
|
68 |
-
### Response:
|
69 |
-
<Leave new line for model to respond>
|
70 |
```
|
71 |
## Usage
|
72 |
```python
|
73 |
from transformers import AutoTokenizer, AutoModelForCausalLM,pipeline
|
74 |
|
75 |
-
tokenizer = AutoTokenizer.from_pretrained("mwitiderrick/
|
76 |
-
model = AutoModelForCausalLM.from_pretrained("mwitiderrick/
|
77 |
query = "Write a quick sort algorithm in Python"
|
78 |
text_gen = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)
|
79 |
-
output = text_gen(f
|
80 |
print(output[0]['generated_text'])
|
81 |
"""
|
82 |
-
### Instruction:
|
83 |
-
write a quick sort algorithm in Python
|
84 |
-
### Response:
|
85 |
-
def quick_sort(arr):
|
86 |
-
if len(arr) <= 1:
|
87 |
-
return arr
|
88 |
-
else:
|
89 |
-
pivot = arr[len(arr) // 2]
|
90 |
-
left = [x for x in arr if x < pivot]
|
91 |
-
middle = [x for x in arr if x == pivot]
|
92 |
-
right = [x for x in arr if x > pivot]
|
93 |
-
return quick_sort(left) + middle + quick_sort(right)
|
94 |
|
95 |
-
arr = [5,2,4,3,1]
|
96 |
-
print(quick_sort(arr))
|
97 |
-
"""
|
98 |
-
[1, 2, 3, 4, 5]
|
99 |
"""
|
100 |
```
|
101 |
## Metrics
|
102 |
-
|
103 |
```
|
104 |
-
|
105 |
-
|----------|-------|------|-----:|------|-----:|---|-----:|
|
106 |
-
|winogrande|Yaml |none | 0|acc |0.6267|± |0.0136|
|
107 |
-
|hellaswag|Yaml |none | 0|acc |0.4962|± |0.0050|
|
108 |
-
| | |none | 0|acc_norm|0.6581|± |0.0047|
|
109 |
-
|arc_challenge|Yaml |none | 0|acc |0.3481|± |0.0139|
|
110 |
-
| | |none | 0|acc_norm|0.3712|± |0.0141|
|
111 |
-
|truthfulqa|N/A |none | 0|bleu_max | 24.2580|± |0.5985|
|
112 |
-
| | |none | 0|bleu_acc | 0.2876|± |0.0003|
|
113 |
-
| | |none | 0|bleu_diff | -8.3685|± |0.6065|
|
114 |
-
| | |none | 0|rouge1_max | 49.3907|± |0.7350|
|
115 |
-
| | |none | 0|rouge1_acc | 0.2558|± |0.0002|
|
116 |
-
| | |none | 0|rouge1_diff|-10.6617|± |0.6450|
|
117 |
-
| | |none | 0|rouge2_max | 32.4189|± |0.9587|
|
118 |
-
| | |none | 0|rouge2_acc | 0.2142|± |0.0002|
|
119 |
-
| | |none | 0|rouge2_diff|-12.9903|± |0.9539|
|
120 |
-
| | |none | 0|rougeL_max | 46.2337|± |0.7493|
|
121 |
-
| | |none | 0|rougeL_acc | 0.2424|± |0.0002|
|
122 |
-
| | |none | 0|rougeL_diff|-11.0285|± |0.6576|
|
123 |
-
| | |none | 0|acc | 0.3072|± |0.0405|
|
124 |
```
|
|
|
1 |
---
|
2 |
+
base_model: mwitiderrick/open_llama_3b_code_instruct_0.1
|
3 |
datasets:
|
4 |
- mwitiderrick/AlpacaCode
|
5 |
inference: true
|
6 |
model_type: llama
|
7 |
prompt_template: |
|
8 |
+
<s>[INST]
|
9 |
{prompt}
|
10 |
+
[/INST]
|
11 |
created_by: mwitiderrick
|
12 |
tags:
|
13 |
- transformers
|
|
|
28 |
metrics:
|
29 |
- name: hellaswag(0-Shot)
|
30 |
type: hellaswag (0-Shot)
|
31 |
+
value: 0.
|
32 |
- task:
|
33 |
type: text-generation
|
34 |
dataset:
|
|
|
37 |
metrics:
|
38 |
- name: winogrande(0-Shot)
|
39 |
type: winogrande (0-Shot)
|
40 |
+
value: 0.
|
41 |
|
42 |
- task:
|
43 |
type: text-generation
|
|
|
47 |
metrics:
|
48 |
- name: arc_challenge(0-Shot)
|
49 |
type: arc_challenge (0-Shot)
|
50 |
+
value: 0.
|
51 |
source:
|
52 |
name: open_llama_3b_instruct_v_0.2 model card
|
53 |
url: https://huggingface.co/mwitiderrick/open_llama_3b_instruct_v_0.2
|
|
|
56 |
---
|
57 |
# OpenLLaMA Code Instruct: An Open Reproduction of LLaMA
|
58 |
|
59 |
+
This is an [OpenLlama model Code Instruct](https://huggingface.co/mwitiderrick/open_llama_3b_code_instruct_0.1) that has been fine-tuned on 1 epoch of the
|
60 |
+
[Glaive Assistsnt](https://huggingface.co/datasets/mwitiderrick/glaive-code-assistant) dataset.
|
61 |
|
62 |
## Prompt Template
|
63 |
```
|
64 |
+
<s>[INST] {{ user_msg }} [/INST]
|
65 |
|
|
|
|
|
|
|
|
|
66 |
```
|
67 |
## Usage
|
68 |
```python
|
69 |
from transformers import AutoTokenizer, AutoModelForCausalLM,pipeline
|
70 |
|
71 |
+
tokenizer = AutoTokenizer.from_pretrained("mwitiderrick/open_llama_3b_glaive_assistant_v0.1")
|
72 |
+
model = AutoModelForCausalLM.from_pretrained("mwitiderrick/open_llama_3b_glaive_assistant_v0.1")
|
73 |
query = "Write a quick sort algorithm in Python"
|
74 |
text_gen = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)
|
75 |
+
output = text_gen(f<s>[INST]{query}[/INST]")
|
76 |
print(output[0]['generated_text'])
|
77 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
|
|
|
|
|
|
|
|
79 |
"""
|
80 |
```
|
81 |
## Metrics
|
82 |
+
|
83 |
```
|
84 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
```
|