nijatzeynalov
commited on
Commit
•
b9001df
1
Parent(s):
f9458b5
Update README.md
Browse files
README.md
CHANGED
@@ -19,3 +19,25 @@ __Our primary objective with this model is to offer insights into the feasibilit
|
|
19 |
|
20 |
This project is a proud product of the [Alas Development Center (ADC)](https://az.linkedin.com/company/alas-development-center?trk=ppro_cprof). We are thrilled to offer these finely-tuned large language models to the public, free of charge.
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
This project is a proud product of the [Alas Development Center (ADC)](https://az.linkedin.com/company/alas-development-center?trk=ppro_cprof). We are thrilled to offer these finely-tuned large language models to the public, free of charge.
|
21 |
|
22 |
+
How to use?
|
23 |
+
|
24 |
+
```
|
25 |
+
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer, pipeline
|
26 |
+
|
27 |
+
model_path = "alasdevcenter/az-decilm"
|
28 |
+
|
29 |
+
model = AutoModelForCausalLM.from_pretrained(model_path)
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
31 |
+
|
32 |
+
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)
|
33 |
+
|
34 |
+
instruction = "Təbiətin qorunması "
|
35 |
+
formatted_prompt = f"""Aşağıda daha çox kontekst təmin edən təlimat var. Sorğunu adekvat şəkildə tamamlayan cavab yazın.
|
36 |
+
### Təlimat:
|
37 |
+
{instruction}
|
38 |
+
### Cavab:
|
39 |
+
"""
|
40 |
+
|
41 |
+
result = pipe(formatted_prompt)
|
42 |
+
print(result[0]['generated_text'])
|
43 |
+
```
|