TheBloke commited on
Commit
97e00be
1 Parent(s): 45de9b5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md CHANGED
@@ -95,3 +95,32 @@ Thank you to all my generous patrons and donaters.
95
  <!-- footer end -->
96
 
97
  # Original model card: Chaoyi Wi's PMC_LLAMA 7B
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  <!-- footer end -->
96
 
97
  # Original model card: Chaoyi Wi's PMC_LLAMA 7B
98
+
99
+ This repo contains PMC_LLaMA_7B, which is LLaMA-7b finetuned on the PMC papers in S2ORC dataset.
100
+
101
+ The model was trained with the following hyperparameters:
102
+
103
+ * Epochs: 5
104
+ * Batch size: 128
105
+ * Cutoff length: 512
106
+ * Learning rate: 2e-5
107
+
108
+ Each epoch we sample 512 tokens per paper for training.
109
+
110
+ The model can be loaded as following:
111
+
112
+ ```
113
+ import transformers
114
+ import torch
115
+ tokenizer = transformers.LlamaTokenizer.from_pretrained('chaoyi-wu/PMC_LLAMA_7B')
116
+ model = transformers.LlamaForCausalLM.from_pretrained('chaoyi-wu/PMC_LLAMA_7B')
117
+ sentence = 'Hello, doctor'
118
+ batch = tokenizer(
119
+ sentence,
120
+ return_tensors="pt",
121
+ add_special_tokens=False
122
+ )
123
+ with torch.no_grad():
124
+ generated = model.generate(inputs = batch["input_ids"], max_length=200, do_sample=True, top_k=50)
125
+ print('model predict: ',tokenizer.decode(generated[0]))
126
+ ```