Downloads · 30 days
25
6% of all-time downloads
afrizalha/Bakpia-V1-9B-Javanese-4bit
Bakpia-V1-9B-Javanese-4bit is a text generation model from afrizalha. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
<!DOCTYPE html <html lang="en" <head <meta charset="UTF-8" <meta name="viewport" content="width=device-width, initial-scale=1.0" <titleDocument Title</title <style h1 { font-size: 36px; color: navy; font-family: 'Taho…
Downloads · 30 days
25
6% of all-time downloads
All-time downloads
401
Public
Parameters
9.4B
6.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.5 GB · 100%
How the weights are stored.
U88.3B · 89%
From the Hugging Face model README
This repository contains the 4bit version of Bakpia V1 9B.
| Version | Base Model | URL | Training |
|---|---|---|---|
| V1 0.5B | Qwen 2 0.5B Instruct | fp16 | Epoch = 1, Batch = 16*8, lr = 5e-5, linear schedule |
| V1 1.5B | Qwen 2 1.5B Instruct | fp16 | Epoch = 1, Batch = 16*8, lr = 5e-5, linear schedule |
| V1 9B | Gemma 2 9B Instruct | fp16/4bit | Batch size = 16*8, lr = 4e-5, linear schedule |
Training data is accessible here.
This is the first version of Bakpia.
✨ Training
✨ Features
# Update transformers for Gemma 2 compatibility + install accelerate and bitsandbytes for loading 4bit model
!pip install -q git+https://github.com/huggingface/transformers.git
!pip install -q accelerate bitsandbytes
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
tokenizer = AutoTokenizer.from_pretrained("afrizalha/Bakpia-V1-9B-Javanese-4bit")
model = AutoModelForCausalLM.from_pretrained("afrizalha/Bakpia-V1-9B-Javanese-4bit", quantization_config=BitsAndBytesConfig(load_in_4bit=True))
model.to("cuda")
template = """<start_of_turn>user
{prompt}<end_of_turn>
<start_of_turn>model
"""
input = template.format(prompt="Kados pundi kulo saged nyinaoni Basa Jawa kanthi sae?")
input = tokenizer([input], return_tensors = "pt").to("cuda")
outputs = model.generate(**input, max_new_tokens = 1024, streamer= TextStreamer(tokenizer), temperature=.5, use_cache=True, do_sample=True)