Downloads · 30 days
2
10% of all-time downloads
zeze35h/gemma3-4b-sentiment-lora-v1
gemma3-4b-sentiment-lora-v1 is a machine learning model from zeze35h. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
[](https://huggingface.co/google/gemma-3-4b-it) [](https://github.com/huggingface/transformers) [](https://github.com/huggingface/peft)
Downloads · 30 days
2
10% of all-time downloads
All-time downloads
21
Public
Parameters
4.3B
8.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.6 GB · 100%
From the Hugging Face model README
This model is a LoRA-fine-tuned variant of Google’s Gemma-3-4B-IT language model.
It was trained to perform sentiment and intent classification on real-world customer-support conversations.
After fine-tuning, the LoRA adapter was merged into the base weights, producing a stand-alone model that can be used directly with transformers, vLLM, or DJL without loading external adapters.
| Task | Description | Example output |
|---|---|---|
| Sentiment Analysis | Classifies a message’s emotional tone | very_negative, negative, neutral, positive, very_positive |
| Custom Sentiments | Identifies customer's specific needs or gibberish | request_human, drop_off, oos_nonsense |
| Intent Recognition | Extracts the customer’s goal or topic | "report damaged item", "book flight", "request supervisor", etc. |
| Conversation-aware | Uses recent chat context to interpret ambiguous user turns | e.g., disambiguates “That’s fine” as neutral vs. positive |
| Component | Detail |
|---|---|
| Base model | google/gemma-3-4b-it |
| Fine-tuning method | LoRA (PEFT) |
| Frameworks | 🤗 Transformers + PEFT + Accelerate |
| Dataset size | ≈ 10 000 messages / ~1 000 conversations |
| Objective | Supervised fine-tuning on labeled sentiment + intent pairs |
Use this model to classify customer-support chats into sentiment and intent labels, or to detect handoff/drop-off cases in virtual-assistant logs.
It’s optimized for:
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "zeze35h/gemma3-4b-sentiment-lora-v1"
tok = AutoTokenizer.from_pretrained(model_id)
mdl = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
prompt = """<start_of_turn>user
Hi, I’ve been waiting for 40 minutes and my internet is still down.
<end_of_turn>
Classify the most recent user message:
Output JSON only with {"sentiment": "...", "intent": "..."}."""
out = mdl.generate(**tok(prompt, return_tensors="pt").to(mdl.device), max_new_tokens=80)
print(tok.decode(out[0], skip_special_tokens=True))