nijatzeynalov commited on
Commit
7640a24
·
verified ·
1 Parent(s): d0c0653

Update README.md

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