Downloads · 30 days
0
Ouchhh/AFLM-v3-10k
AFLM-v3-10k is a machine learning model from Ouchhh. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a PEFT / LoRA adapter trained on top of unsloth/gemma-2b-bnb-4bit (a 4-bit quantized Gemma 2B base model). It is not a standalone full model checkpoint — you load the base model first, then at…
Downloads · 30 days
0
Access
Public
Updated Feb 5, 2026
Repo size
117 MB
Likes
0
Public
Click a slice to open those files.
.safetensors78.5 MB · 67%
From the Hugging Face model README
This repository contains a PEFT / LoRA adapter trained on top of unsloth/gemma-2b-bnb-4bit (a 4-bit quantized Gemma 2B base model).
It is not a standalone full model checkpoint — you load the base model first, then attach this adapter.
adapter_model.safetensors — LoRA adapter weightsadapter_config.json — PEFT configurationtokenizer.* + special_tokens_map.json — tokenizer filestokenizer_config.json — includes a chat template for <start_of_turn> / <end_of_turn> formattingunsloth/gemma-2b-bnb-4bitCAUSAL_LM)q_proj, k_proj, v_proj, o_proj, up_proj, gate_proj, down_projRequirements:
transformers,peft,accelerate,safetensors
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_id = "unsloth/gemma-2b-bnb-4bit"
adapter_dir = "./" # this folder
tokenizer = AutoTokenizer.from_pretrained(adapter_dir, use_fast=True)
base = AutoModelForCausalLM.from_pretrained(
base_id,
device_map="auto",
torch_dtype=torch.float16,
)
model = PeftModel.from_pretrained(base, adapter_dir)
model.eval()
messages = [
{"role": "user", "content": "Write a short paragraph about data-driven art."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=256, do_sample=True, temperature=0.7)
print(tokenizer.decode(out[0], skip_special_tokens=True))
This adapter expects a Gemma-style chat formatting using:
<start_of_turn>user ... <end_of_turn><start_of_turn>model ... <end_of_turn>A ready-to-use chat_template is included in tokenizer_config.json, so you can rely on:
tokenizer.apply_chat_template(messages, add_generation_prompt=True)If you do not use apply_chat_template, your manual prompt should look like:
<start_of_turn>user
YOUR QUESTION HERE<end_of_turn>
<start_of_turn>model
Please document your training dataset(s), filtering steps, and evaluation here.
chat_template and a complete README/model card.