File size: 2,221 Bytes
5c41b12
 
2b2a628
e8a5630
4f714e1
5c41b12
 
 
 
 
20e2efc
5c41b12
 
4f714e1
 
 
 
 
5c41b12
bdb8dd9
5c41b12
 
 
 
4f714e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
base_model: openlm-research/open_llama_3b
datasets:
- mwitiderrick/OpenPlatypus
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
---
# OpenLLaMA 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 2 epochs of the first 5000 samples from the
[Open-Platypus](https://huggingface.co/datasets/garage-bAInd/Open-Platypus) dataset.

The modified version of the dataset can be found [here](mwitiderrick/Open-Platypus)

## Usage 
```python
from transformers import AutoTokenizer, AutoModelForCausalLM,pipeline

tokenizer = AutoTokenizer.from_pretrained("mwitiderrick/open_llama_3b_chat_v_0.1")
model = AutoModelForCausalLM.from_pretrained("mwitiderrick/open_llama_3b_chat_v_0.1")
query = "How can I evaluate the performance and quality of the generated text from language models?"
text_gen = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)
output = text_gen(f"### Instruction:\n{query}### Response:\n")
print(output[0]['generated_text'])
"""
### Instruction:
How can I evaluate the performance and quality of the generated text from language models?### Response:
I want to evaluate the performance of the language model by comparing the generated text with the original text. I can use a similarity measure to compare the two texts. For example, I can use the Levenshtein distance, which measures the number of edits needed to transform one text into another. The Levenshtein distance between two texts is the minimum number of edits needed to transform one text into another. The Levenshtein distance between two texts is the minimum number of edits needed to transform one text into another. The Levenshtein distance between two texts is the minimum number of edits needed to transform one text into another. The Levenshtein distance between two texts is the minimum number of edits needed to transform one text into another. The Levenshtein distance between two texts is the minimum number
"""
```