nijatzeynalov commited on
Commit
49008bd
1 Parent(s): c887bc8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -0
README.md CHANGED
@@ -19,3 +19,26 @@ __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
+
23
+ How to use?
24
+
25
+ ```
26
+ from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer, pipeline
27
+
28
+ model_path = "alasdevcenter/az-pandalm"
29
+
30
+ model = AutoModelForCausalLM.from_pretrained(model_path)
31
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
32
+
33
+ pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)
34
+
35
+ instruction = "Təbiətin qorunması "
36
+ formatted_prompt = f"""Aşağıda daha çox kontekst təmin edən təlimat var. Sorğunu adekvat şəkildə tamamlayan cavab yazın.
37
+ ### Təlimat:
38
+ {instruction}
39
+ ### Cavab:
40
+ """
41
+
42
+ result = pipe(formatted_prompt)
43
+ print(result[0]['generated_text'])
44
+ ```