Downloads · 30 days
0
Alamaks/Mangga-2-1b
Mangga-2-1b is a machine learning model from Alamaks. 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.
This model is fine-tuned from unsloth/gemma-3-1b-it-unsloth-bnb-4bit using the LoRA (Low-Rank Adaptation) method with a specific dataset focused on local knowledge (such as "Kota Mangga" - Indramayu, the Mango City).
Downloads · 30 days
0
Access
Public
Updated Jul 23, 2025
Parameters
1000M
3.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.9 GB · 98%
From the Hugging Face model README
This model is fine-tuned from unsloth/gemma-3-1b-it-unsloth-bnb-4bit using the LoRA (Low-Rank Adaptation) method with a specific dataset focused on local knowledge (such as "Kota Mangga" - Indramayu, the Mango City).
This model was trained using Unsloth for significant memory and speed efficiency.
This repository contains the model in two formats for flexibility:
/
├── config.json
├── model.safetensors
├── tokenizer.json
├── tokenizer_config.json
├── special_tokens_map.json
├── generation_config.json
└── adapter/ # adapter LoRA
├── adapter_config.json
├── adapter_model.safetensors
└── ...
This is the easiest way to use the model. You will be loading a ready-to-use merged model.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "Alamaks/Mangga-2-1b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16, # Gunakan float16 untuk efisiensi
device_map="auto"
)
# Contoh penggunaan
inputs = tokenizer("Siapakah bupati Indramayu saat ini?", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
If you want to apply the adapter to the base model manually.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model_id = "unsloth/gemma-3-1b-it"
adapter_id = "Alamaks/Mangga-2-1b"
# Load the base model
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto"
)
# Load the tokenizer from this repo (as there might be new tokens)
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
# Apply the adapter
model = PeftModel.from_pretrained(
base_model,
adapter_id,
subfolder="adapter" # Don't forget the subfolder
)
# Example usage
inputs = tokenizer("Jelaskan tentang julukan Indramayu sebagai Kota Mangga.", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Model Hierarchy:
google/gemma-3-1b-it (Google Gemma-3-1B Instruct)unsloth/gemma-3-1b-it (Optimized version of the Google model)unsloth/gemma-3-1b-it-unsloth-bnb-4bit (4-bit quantized version for fine-tuning)Alamaks/Mangga-2-1b (The fine-tuned model)Specifications:
Apache 2.0