Instructions to use jayshah5696/gemma4-e2b-humanize-unsloth-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jayshah5696/gemma4-e2b-humanize-unsloth-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-E2B-it") model = PeftModel.from_pretrained(base_model, "jayshah5696/gemma4-e2b-humanize-unsloth-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use jayshah5696/gemma4-e2b-humanize-unsloth-lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jayshah5696/gemma4-e2b-humanize-unsloth-lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jayshah5696/gemma4-e2b-humanize-unsloth-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for jayshah5696/gemma4-e2b-humanize-unsloth-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="jayshah5696/gemma4-e2b-humanize-unsloth-lora", max_seq_length=2048, )
Gemma 4 E2B Humanize-RL β SFT LoRA adapter
LoRA adapter trained on the humanize-rl SFT dataset
(jayshah5696/humanize-rl-sft-dataset) over unsloth/gemma-4-E2B-it. Designed to
shift the base model's prose toward the humanize-rl rubric: natural,
concise, low corporate filler, format-faithful.
For inference, prefer the pre-merged checkpoint
jayshah5696/gemma4-e2b-humanize-unsloth-merged (parity-verified)
unless you specifically need the adapter on top of a different base.
Quickstart β direct LoRA loading
import torch
from peft import PeftModel
from transformers import AutoModelForImageTextToText, AutoProcessor
base = AutoModelForImageTextToText.from_pretrained(
"unsloth/gemma-4-E2B-it", torch_dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(base, "jayshah5696/gemma4-e2b-humanize-unsloth-lora")
processor = AutoProcessor.from_pretrained("unsloth/gemma-4-E2B-it")
Provenance
- base model:
unsloth/gemma-4-E2B-it - training framework: Unsloth
FastModel+ TRLSFTTrainer - LoRA rank:
8 - LoRA alpha:
8 - bf16, no QLoRA
- target modules: regex covering language-model
{q,k,v,o,gate,up,down}_proj(PEFT skips Gemma 4 KV-shared layers whosek_proj/v_projmodules do not exist; this is correct). - license: Apache-2.0 (matches base)
Verification report
- verified on (UTC):
2026-05-25 - direct LoRA generation: PASS on the 10-prompt parity set
- 9/10 outputs identical to the merged checkpoint
(
jayshah5696/gemma4-e2b-humanize-unsloth-merged)
Known limitations
- Gemma 4 KV-shared layers (indices 15-34) do not have
k_proj/v_projmodules to attach LoRA to. PEFT silently skips them. This is correct and documented in transformers PR #45328. - Loaders other than Unsloth + PEFT may not understand this adapter's
regex
target_modules. If so, expand to a list before publishing derivatives.
- Downloads last month
- 58