Instructions to use S4MPL3BI4S/gemma4-e4b-openclaw-agent-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use S4MPL3BI4S/gemma4-e4b-openclaw-agent-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-e4b-it-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "S4MPL3BI4S/gemma4-e4b-openclaw-agent-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use S4MPL3BI4S/gemma4-e4b-openclaw-agent-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 S4MPL3BI4S/gemma4-e4b-openclaw-agent-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 S4MPL3BI4S/gemma4-e4b-openclaw-agent-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for S4MPL3BI4S/gemma4-e4b-openclaw-agent-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="S4MPL3BI4S/gemma4-e4b-openclaw-agent-lora", max_seq_length=2048, )
Gemma 4 E4B OpenClaw Agent LoRA
This repository contains a LoRA adapter fine-tuned from unsloth/gemma-4-E4B-it for an OpenClaw-style Python function-calling coding agent.
Training Summary
- Base model:
unsloth/gemma-4-E4B-it - Dataset:
driaforall/pythonic-function-calling(train) - Training method: Supervised fine-tuning with Unsloth and TRL
SFTTrainer - Adapter: LoRA,
r=32,alpha=32, dropout0 - Tuned modules: language layers, attention modules, and MLP modules; vision layers disabled
- Quantization during training:
load_in_4bit=True - Max sequence length:
2048 - Batching: per-device batch size
1, gradient accumulation4 - Learning rate:
0.0002 - Training steps:
1000 - Seed:
3407
Data Formatting
The training data was formatted from driaforall/pythonic-function-calling. Function schemas from dataset system messages were preserved and folded into the first user turn to satisfy Gemma's strict user/model chat alternation. Loss was applied only to model response spans with train_on_responses_only.
Intended Use
This adapter is intended for experiments with Pythonic function-calling and coding-agent behavior. It should be evaluated carefully before use in any production agent loop, especially around tool-call validity and safe code execution.
- Downloads last month
- 70