Instructions to use yamura4/scenidiom-qwen3-14b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use yamura4/scenidiom-qwen3-14b-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B") model = PeftModel.from_pretrained(base_model, "yamura4/scenidiom-qwen3-14b-lora") - Notebooks
- Google Colab
- Kaggle
Configuration Parsing Warning:In adapter_config.json: "peft.base_model_name_or_path" must be a string
ScenIdiom: Bilingual Idiom Expert (Qwen 3 14B LoRA)
ScenIdiom is a specialized LoRA adapter for Qwen 3 (14B) built to solve a specific linguistic translation challenge: mapping everyday situational descriptions to the correct figurative idioms in both Dutch and English.
Standard translation models often struggle with idioms, defaulting to literal translations that lose the cultural meaning. ScenIdiom was trained to understand context. If you describe a situation, the model will return the most appropriate idiom, its meaning, a natural example sentence, and the cross-lingual equivalent.
Model Capabilities
- Situational Mapping: Describe a scenario (e.g., "My friend keeps talking but never actually does anything"), and the model returns the precise expression ("All talk and no trousers" / "Veel geschreeuw, maar weinig wol").
- Bilingual Fluency: Seamlessly pivots between Dutch and English situational contexts.
- Structured Output: Enforces a clean, consistent response format containing the Expression, Meaning, Example, and Translation.
Dataset & Training
This adapter was fine-tuned on a highly curated dataset of ~2,700 situational pairs.
The raw idioms were sourced from respected linguistic databases (Onze Taal for Dutch, EF Education First for English). The data underwent rigorous programmatic filtering to remove dictionary artifacts, historical trivia, and archaic proverbs. Finally, it was instruction-tuned into ChatML format using a 405B parameter teacher model to generate highly varied, natural situational prompts.
Training Hyperparameters (Fireworks AI):
- Method: Supervised Fine-Tuning (SFT)
- Epochs: 3
- LoRA Rank (r): 16
- Max Context Length: 4096
- Learning Rate: 1e-4
- Warmup Steps: 20
Usage
You can load this adapter on top of the base Qwen 3 (14B) model using the standard peft and transformers stack.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load Base Model and Tokenizer
base_model_id = "Qwen/Qwen3-14B"
model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
# Attach the ScenIdiom LoRA Adapter
model = PeftModel.from_pretrained(model, "yamura4/scenidiom-qwen3-14b-lora")
# Format your prompt (ChatML)
messages = [
{"role": "system", "content": "Je bent een expert in Nederlandse uitdrukkingen en spreekwoorden. Gegeven een situatie, geef je het meest passende Nederlandse idioom of spreekwoord, samen met de betekenis, een gebruiksvoorbeeld en de Engelse vertaling."},
{"role": "user", "content": "Situatie: I am extremely nervous and my hands are sweating before giving a big presentation to the board of directors."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to("cuda")
# Generate
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Example Output
**Uitdrukking:** pekelzweet zweten
**Betekenis:** Erg nerveus of bang zijn.
**Voorbeeld:** 'Toen hij de vergaderzaal binnenstapte om zijn plannen aan de directie te presenteren, stond hij pekelzweet te zweten.'
**Engels:** sweating bullets / having butterflies in your stomach
- Downloads last month
- 8