File size: 2,309 Bytes
3a4c9de
 
 
7593825
3a4c9de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7593825
3a4c9de
 
7593825
3a4c9de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
base_model: openlm-research/open_llama_3b
datasets:
- mwitiderrick/AlpacaCode
inference: true
model_type: llama
prompt_template: |
  ### Instruction:\n
  {prompt}
  ### Response:
created_by: mwitiderrick
tags:
- transformers
license: apache-2.0
language:
- en
library_name: transformers
pipeline_tag: text-generation

model-index:
  - name: mwitiderrick/open_llama_3b_instruct_v_0.2
    results:
      - task:
          type: text-generation
        dataset:
          name: hellaswag
          type: hellaswag
        metrics:
          - name: hellaswag(0-Shot)
            type: hellaswag (0-Shot)
            value: 0.4882
      - task:
          type: text-generation
        dataset:
          name: winogrande
          type: winogrande
        metrics:
          - name: winogrande(0-Shot)
            type: winogrande (0-Shot)
            value: 0.6133

      - task:
          type: text-generation
        dataset:
          name: arc_challenge
          type: arc_challenge
        metrics:
          - name: arc_challenge(0-Shot)
            type: arc_challenge (0-Shot)
            value: 0.3362
        source:
          name: open_llama_3b_instruct_v_0.2 model card
          url: https://huggingface.co/mwitiderrick/open_llama_3b_instruct_v_0.2

          
---
# OpenLLaMA Code Instruct: An Open Reproduction of LLaMA

This is an [OpenLlama model](https://huggingface.co/openlm-research/open_llama_3b) that has been fine-tuned on 1 epoch of the
[AlpacaCode](https://huggingface.co/datasets/mwitiderrick/AlpacaCode) dataset.

The modified version of the dataset can be found [here](mwitiderrick/Open-Platypus)
## Prompt Template
```
### Instruction:

{query}

### Response:
<Leave new line for model to respond> 
```
## Usage 
```python
from transformers import AutoTokenizer, AutoModelForCausalLM,pipeline

tokenizer = AutoTokenizer.from_pretrained("mwitiderrick/open_llama_3b_instruct_v_0.2")
model = AutoModelForCausalLM.from_pretrained("mwitiderrick/open_llama_3b_instruct_v_0.2")
query = "Provide step-by-step instructions for making a sweet chicken bugger"
text_gen = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=500)
output = text_gen(f"### Instruction:\n{query}\n### Response:\n")
print(output[0]['generated_text'])
"""

"""
```
## Metrics
```

```