Downloads · 30 days
15
31% of all-time downloads
bhismaperkasa/gemma-3-1B-it-chat-seru-adapter
gemma-3-1B-it-chat-seru-adapter is a machine learning model from bhismaperkasa. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapter untuk generate form definitions dalam JSON format. Trained dengan Unsloth framework untuk efficiency maksimal.
Downloads · 30 days
15
31% of all-time downloads
All-time downloads
49
Public
Repo size
159 MB
Likes
0
Public
Click a slice to open those files.
.json145 MB · 45%
From the Hugging Face model README
LoRA adapter untuk generate form definitions dalam JSON format. Trained dengan Unsloth framework untuk efficiency maksimal.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"google/gemma-3-270m-it",
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Load adapter
model = PeftModel.from_pretrained(
base_model,
"bhismaperkasa/gemma-3-1B-it-chat-seru-adapter"
)
model.eval()
tokenizer = AutoTokenizer.from_pretrained("bhismaperkasa/gemma-3-1B-it-chat-seru-adapter")
prompt = "<start_of_turn>user\nbuatkan form login<end_of_turn>\n<start_of_turn>model\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.7,
top_p=0.95,
do_sample=True
)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result.split("<start_of_turn>model\n")[-1])
Using adapter instead of merged model because:
Apache 2.0 (following Gemma license)