Update README.md
Browse files
README.md
CHANGED
@@ -72,11 +72,22 @@ Users (both direct and downstream) should be made aware of the risks, biases and
|
|
72 |
|
73 |
Use the code below to get started with the model.
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
[More Information Needed]
|
76 |
|
77 |
## Training Details
|
78 |
|
79 |
### Training Data
|
|
|
80 |
|
81 |
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
82 |
|
|
|
72 |
|
73 |
Use the code below to get started with the model.
|
74 |
|
75 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
76 |
+
|
77 |
+
model = AutoModelForCausalLM.from_pretrained("linh5nb/Llama-2-7b-chat-finetune_covid")
|
78 |
+
tokenizer = AutoTokenizer.from_pretrained("linh5nb/Llama-2-7b-chat-finetune_covid")
|
79 |
+
|
80 |
+
prompt = "What is the main cause of HIV-1 infection in children?"
|
81 |
+
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)
|
82 |
+
result = pipe(f"<s>[INST] {prompt} [/INST]")
|
83 |
+
print(result[0]['generated_text'])
|
84 |
+
|
85 |
[More Information Needed]
|
86 |
|
87 |
## Training Details
|
88 |
|
89 |
### Training Data
|
90 |
+
https://huggingface.co/datasets/hodgesz/covid_qa_llama2
|
91 |
|
92 |
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
93 |
|