Instructions to use Oysiyl/gemma-4-31b-unslop-good-lora-v2-full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Oysiyl/gemma-4-31b-unslop-good-lora-v2-full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Oysiyl/gemma-4-31b-unslop-good-lora-v2-full") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Oysiyl/gemma-4-31b-unslop-good-lora-v2-full") model = AutoModelForMultimodalLM.from_pretrained("Oysiyl/gemma-4-31b-unslop-good-lora-v2-full") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Oysiyl/gemma-4-31b-unslop-good-lora-v2-full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Oysiyl/gemma-4-31b-unslop-good-lora-v2-full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Oysiyl/gemma-4-31b-unslop-good-lora-v2-full", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Oysiyl/gemma-4-31b-unslop-good-lora-v2-full
- SGLang
How to use Oysiyl/gemma-4-31b-unslop-good-lora-v2-full with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Oysiyl/gemma-4-31b-unslop-good-lora-v2-full" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Oysiyl/gemma-4-31b-unslop-good-lora-v2-full", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Oysiyl/gemma-4-31b-unslop-good-lora-v2-full" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Oysiyl/gemma-4-31b-unslop-good-lora-v2-full", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Unsloth Studio
How to use Oysiyl/gemma-4-31b-unslop-good-lora-v2-full 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 Oysiyl/gemma-4-31b-unslop-good-lora-v2-full 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 Oysiyl/gemma-4-31b-unslop-good-lora-v2-full to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Oysiyl/gemma-4-31b-unslop-good-lora-v2-full to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Oysiyl/gemma-4-31b-unslop-good-lora-v2-full", max_seq_length=2048, ) - Docker Model Runner
How to use Oysiyl/gemma-4-31b-unslop-good-lora-v2-full with Docker Model Runner:
docker model run hf.co/Oysiyl/gemma-4-31b-unslop-good-lora-v2-full
gemma-4-31b-unslop-good-lora-v2-full
- Developed by: Oysiyl
- Base model: unsloth/gemma-4-31B-it
- Dataset: N8Programs/unslop-good (full train split)
- Training stack: Unsloth + TRL (SFTTrainer, response-only masking)
- Output type: merged full weights (fp16-style merged artifacts)
Training configuration (run: 69d9faf6cd8c002f31df81c4)
- max_seq_length: 8192
- epochs: 1
- batch_size: 1
- grad_accumulation: 4
- learning_rate: 1e-4
- warmup_steps: 10
- scheduler: cosine
- LoRA: r=8, alpha=8, dropout=0.0
Normalized training loss
- max_steps: 250
- observed points: 250
- first loss: 3.0173 (step 1)
- last loss: 2.0200 (step 250)
Recommended evaluation sample
Use this full fiction passage for held-out testing:
The wind rose all at once, as if the mountain itself had inhaled. She stood at the edge of the pass, cloak snapping like a torn banner behind her, staring down at the valley where the last lights were going out one by one. Each flame extinguished felt deliberate—an answer to a question she had been too afraid to ask. Somewhere below, bells began to ring, not in warning, but in mourning. They already knew. “Don’t,” he said, breathless, reaching for her arm. His fingers brushed fabric, then air. “If you cross that line, there’s no coming back.” She didn’t turn. The cold burned her lungs, sharpened her thoughts. “There was never a way back,” she replied softly. “Only a way forward you were willing to pretend didn’t exist.” Thunder rolled, low and ancient. For a moment, the sky fractured into white fire, and in that instant he saw her face—resolved, terrified, incandescent with purpose. Not the girl he had sworn to protect, but the woman the world had demanded she become. “You’ll die,” he said. She smiled then, finally facing him, eyes bright with unshed tears. “So will everyone,” she answered. “The difference is what we leave burning when we’re gone.” She stepped forward. The mountain exhaled.
Full observed output on that sample
The wind surged suddenly, as though the mountain had drawn a breath. At the edge of the pass, her cloak snapped behind her like a tattered flag. Below, the last lights of the valley flickered out one by one; each extinguished flame felt intentional, an answer to a question she hadn't dared to voice. Then came the bells, tolling not for alarm, but for grief. They knew.
"Don't," he gasped, lunging for her arm. His fingers caught cloth, then empty air. "If you cross that line, you can't come back."
She didn't look at him. The freezing air seared her lungs, clearing her mind. "There was never a way back," she said quietly. "Just a path forward you chose to ignore."
A low, ancient thunder rumbled. A flash of white fire split the sky, illuminating her face for a heartbeat—determined, frightened, alight with resolve. This wasn't the girl he had promised to shield, but the woman the world had forced her to be.
"You'll die," he said.
She turned to him then, smiling through eyes shimmering with unshed tears. "We all will," she replied. "The only thing that matters is what we leave burning."
She stepped forward. The mountain breathed out.
- Downloads last month
- 12