Update README.md
Browse files
README.md
CHANGED
@@ -28,6 +28,36 @@ More information needed
|
|
28 |
|
29 |
More information needed
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
## Training and evaluation data
|
32 |
|
33 |
| Step | Training Loss |
|
|
|
28 |
|
29 |
More information needed
|
30 |
|
31 |
+
## Example Use Cases:
|
32 |
+
```
|
33 |
+
from transformers import AutoTokenizer
|
34 |
+
from transformers import pipeline
|
35 |
+
import torch
|
36 |
+
|
37 |
+
tokenizer = AutoTokenizer.from_pretrained("Vasanth/codellama2-finetuned-codex-fin")
|
38 |
+
pipe = pipeline(
|
39 |
+
"text-generation",
|
40 |
+
model="damerajee/codellama2-finetuned-alpaca-18k-fin",
|
41 |
+
torch_dtype=torch.float16,
|
42 |
+
device_map="auto",
|
43 |
+
)
|
44 |
+
|
45 |
+
text = "write a function that takes in print out each individual characters in a string"
|
46 |
+
|
47 |
+
sequences = pipe(
|
48 |
+
text,
|
49 |
+
do_sample=True,
|
50 |
+
temperature=0.3,
|
51 |
+
top_p=0.7,
|
52 |
+
num_return_sequences=1,
|
53 |
+
eos_token_id=tokenizer.eos_token_id,
|
54 |
+
max_length=80,
|
55 |
+
)
|
56 |
+
for seq in sequences:
|
57 |
+
print(f"Result: {seq['generated_text']}")
|
58 |
+
|
59 |
+
```
|
60 |
+
|
61 |
## Training and evaluation data
|
62 |
|
63 |
| Step | Training Loss |
|