Downloads · 30 days
12
43% of all-time downloads
bhismaperkasa/gemma-3-270m-form-generator-adapter_unslothed
gemma-3-270m-form-generator-adapter_unslothed 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
12
43% of all-time downloads
All-time downloads
28
Public
Repo size
589 MB
Likes
0
Public
Click a slice to open those files.
.safetensors486 MB · 59%
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-270m-form-generator-adapter_unslothed"
)
model.eval()
tokenizer = AutoTokenizer.from_pretrained("bhismaperkasa/gemma-3-270m-form-generator-adapter_unslothed")
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)