Text Generation
Transformers
Safetensors
Telugu
English
Inference Endpoints
Telugu-LLM-Labs commited on
Commit
975a8e4
1 Parent(s): 9d06e38

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +76 -0
README.md CHANGED
@@ -3,3 +3,79 @@ license: other
3
  license_name: gemma
4
  license_link: LICENSE
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  license_name: gemma
4
  license_link: LICENSE
5
  ---
6
+
7
+ ---
8
+ license: other
9
+ datasets:
10
+ - Telugu-LLM-Labs/yahma_alpaca_cleaned_telugu_filtered_and_romanized
11
+ - >-
12
+ Telugu-LLM-Labs/teknium_GPTeacher_general_instruct_telugu_filtered_and_romanized
13
+ language:
14
+ - te
15
+ - en
16
+ ---
17
+ # Telugu-gemma-2b-finetuned-sft
18
+
19
+
20
+ This model is based on [google/gemma-2b](https://huggingface.co/google/gemma-2b) and hase been finetuned on instruction datasets:
21
+ 1. [yahma_alpaca_cleaned_telugu_filtered_and_romanized](https://huggingface.co/datasets/Telugu-LLM-Labs/yahma_alpaca_cleaned_telugu_filtered_and_romanized)
22
+ 2. [teknium_GPTeacher_general_instruct_telugu_filtered_and_romanized](https://huggingface.co/datasets/Telugu-LLM-Labs/teknium_GPTeacher_general_instruct_telugu_filtered_and_romanized)
23
+
24
+ The model is finetuned using [unsloth](https://github.com/unslothai/unsloth) library and we provide inference code using the same for faster inference.
25
+
26
+ # Input Text Format
27
+
28
+ ```
29
+ ### Instruction: {instruction}
30
+
31
+ ### Input: {input}
32
+
33
+ ## Response: {response}
34
+ ```
35
+
36
+ # Usage
37
+
38
+ ```python3
39
+ from unsloth import FastLanguageModel
40
+ import torch
41
+ max_seq_length = 2048
42
+ dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
43
+ load_in_4bit = False
44
+ model, tokenizer = FastLanguageModel.from_pretrained(
45
+ model_name = "Telugu-LLM-Labs/Telugu-gemma-2b-finetuned-sft",
46
+ max_seq_length = max_seq_length,
47
+ dtype = dtype,
48
+ load_in_4bit = load_in_4bit,
49
+ device_map="auto"
50
+ )
51
+ FastLanguageModel.for_inference(model) # Enable native 2x faster inference
52
+
53
+ input_prompt = """
54
+ ### Instruction:
55
+ {}
56
+
57
+ ### Input:
58
+ {}
59
+
60
+ ### Response:
61
+ {}"""
62
+
63
+ input_text = input_prompt.format(
64
+ "కింది వచనాన్ని రెండు పాయింట్లలో సంగ్రహించండి.", # instruction
65
+ "Google వార్తలు అనేది Google ద్వారా అభివృద్ధి చేయబడిన వార్తా అగ్రిగేటర్ సేవ. ఇది వేలకొద్దీ ప్రచురణకర్తలు మరియు మ్యాగజైన్‌ల నుండి నిర్వహించబడిన కథనాలకు నిరంతర లింక్‌లను అందిస్తుంది. Google వార్తలు Android, iOS మరియు వెబ్‌లో యాప్‌గా అందుబాటులో ఉన్నాయి. గూగుల్ సెప్టెంబరు 2002లో బీటా వెర్షన్‌ను మరియు జనవరి 2006లో అధికారిక యాప్‌ను విడుదల చేసింది.", # input
66
+ "", # output - leave this blank for generation!
67
+ )
68
+
69
+ inputs = tokenizer([input_text], return_tensors = "pt").to("cuda")
70
+
71
+ outputs = model.generate(**inputs, max_new_tokens = 300, use_cache = True)
72
+ response = tokenizer.batch_decode(outputs)
73
+ ```
74
+
75
+ # Developers:
76
+
77
+ The model is a collaborative effort by [Ravi Theja](https://twitter.com/ravithejads) and [Ramsri Goutham](https://twitter.com/ramsri_goutham). Feel free to DM either of us if you have any questions.
78
+
79
+ # Note:
80
+
81
+ The model is quite sensitive to parameters and inputs and is not yet ready for production. It remains in the experimental phase, and we recommend using it accordingly.