Downloads · 30 days
0
RichardErkhov/firqaaa_-_indo-gemma-2b-alpaca-exl2
firqaaa_-_indo-gemma-2b-alpaca-exl2 is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Jan 18, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json1 MB · 99%
From the Hugging Face model README
Quantization made by Richard Erkhov.
indo-gemma-2b-alpaca - EXL2
| 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. |
With git:
git clone --single-branch --branch 6_5 https://huggingface.co/firqaaa_-_indo-gemma-2b-alpaca-exl2 indo-gemma-2b-alpaca-6_5
With huggingface hub:
pip3 install huggingface-hub
To download a specific branch, use the --revision parameter. For example, to download the 6.5 bpw branch:
Linux:
huggingface-cli download firqaaa_-_indo-gemma-2b-alpaca-exl2 --revision 6_5 --local-dir indo-gemma-2b-alpaca-6_5 --local-dir-use-symlinks False
Windows (which apparently doesn't like _ in folders sometimes?):
huggingface-cli download firqaaa_-_indo-gemma-2b-alpaca-exl2 --revision 6_5 --local-dir indo-gemma-2b-alpaca-6.5 --local-dir-use-symlinks False
language:
Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models. They are text-to-text, decoder-only large language models, available in English, with open weights, pre-trained variants, and instruction-tuned variants. Gemma models are well-suited for a variety of text generation tasks, including question answering, summarization, and reasoning. Their relatively small size makes it possible to deploy them in environments with limited resources such as a laptop, desktop or your own cloud infrastructure, democratizing access to state of the art AI models and helping foster innovation for everyone.
Models are trained on a context length of 8192 tokens.
# Prompt
alpaca_prompt = """Di bawah ini adalah instruksi yang menjelaskan tugas, dipasangkan dengan masukan yang memberikan konteks lebih lanjut. Tulis tanggapan yang melengkapi instruksi dengan tepat.
### Instruksi:
{}
### Masukan:
{}
### Tanggapan:
{}"""
max_seq_length = 4096 # Choose any! We auto support RoPE Scaling internally!
dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.
if True:
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "indo-gemma-2b-alpaca",
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit
)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
inputs = tokenizer(
[
alpaca_prompt.format(
"Sebutkan langkah-langkah membuat nasi goreng!",
"", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt"
).to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 256)