Views
No views yet
| Branch | Bits | Description |
|---|---|---|
| 8_0 | 8.0 | Maximum quality that ExLlamaV2 can produce, near unquantized performance. |
| 6_5 | 6.5 | Very similar to 8.0, good tradeoff of size vs performance, recommended. |
| 5_0 | 5.0 | Slightly lower quality vs 6.5, but usable |
| 4_25 | 4.25 | GPTQ equivalent bits per weight, slightly higher quality. |
| 3_5 | 3.5 | Lower quality, only use if you have to. |
git clone --single-branch --branch 6_5 https://huggingface.co/TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2 Gemma-2B-Telugu_Instruct_Finetuned-6_5pip3 install huggingface-hub--revision parameter. For example, to download the 6.5 bpw branch:
Linux:huggingface-cli download TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2 --revision 6_5 --local-dir Gemma-2B-Telugu_Instruct_Finetuned-6_5 --local-dir-use-symlinks Falsehuggingface-cli download TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2 --revision 6_5 --local-dir Gemma-2B-Telugu_Instruct_Finetuned-6.5 --local-dir-use-symlinks FalseTelugu-LLM-Labs/teknium_GPTeacher_general_instruct_telugu_filtered_and_romanized pipeline_tag: text-generation
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{}
### Input:
{}
### Response:
{}"""import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model_name = "TeluguHouseCollective/Gemma-2B-Telugu_Instruct_Finetuned"
tokenizer = AutoTokenizer.from_pretrained(model_name, padding_side="right")
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16).to(device)inputs = tokenizer(
[
alpaca_prompt.format(
"fibonacci series rayadaniki python program ivvu", # instruction
"", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 256, use_cache = True)
tokenizer.batch_decode(outputs)Response:\nfibonnaci rayadaniki python program ikkada vundi:\n\n\'\'\'\n
def fibonacci(n):\n """\n fibonacci series rayadaniki python program.\n """\n
a = 0\n b = 1\n series = [a, b]\n
for i in range(2, n + 1):\n
series.append(a + b)\n
a, b = b, a + b\n
return series\n\n#
fibonacci series rayadaniki 10 vibhinna sankhyalanu rayandi\n
series = fibonacci(10)\nprint(series)\n\'\'\'\n\n
e program fibonacci series rayadaniki python language upayogistamdi
mariyu fibonacci(n) function upayoginchi fibonacci(n) sankhyanu
rayadaniki fibonacci(n) function upayogistamdi.
fibonacci(n) function yokka prarambha viluvanu 0 mariyu 1 set cheyadam dwara prarambhamavuthundi,
mariyu idi fibonacci(n) yokka prarambha viluvanu 0 mariyu 1 nundi n nundi 1 nundi 0 varaku prarambhama
inputs = tokenizer(
[
alpaca_prompt.format(
"ఆరోగ్యంగా ఉండాలి అంటే ఎం చేయాలి?", # instruction
"", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 256, use_cache = True)
tokenizer.batch_decode(outputs)### Response:
oka nirdishta anubhavanni batti, miru aaharam mariyu poshanalapai drishti pettavachu. kani, oka nirdishta anubhavanni batti, miru aaharam mariyu poshanalapai drishti pettavachu.
meeru aaharam mariyu poshanalapai drishti pettavachchu,
endukante idi mee aarogyanni meruguparachadamla sahayapaduthundi.
meeru aaharam mariyu poshanalapai drishti pettavachchu, endukante idi mee sarirak srama,
nidra mariyu manasika aarogyanni meruguparachadamla sahayapaduthundi.
meeru aaharam mariyu poshanalapai drishti pettavachchu,
endukante idi mee sarirak srama, nidra mariyu manasika aarogyanni meruguparachadamla sahayapaduthundi.
meeru aaharam mariyu poshanalapai drishti pettavachchu, endukante idi mee sarirak srama,
nidra mariyu manasika aarogyanni meruguparachad