Movie Recommender LLM (LoRA Fine-Tuned StableLM 2 1.6B)
first-techcraze/movie-recommender-v1
is a conversational language model fine-tuned with LoRA on top of stabilityai/stablelm-2-1_6b
, using a custom Bollywood movie dataset. It is designed to handle fuzzy, emotional, and multi-intent movie queries and provide relevant Bollywood film recommendations based on genre, themes, and user preferences.
Use Cases
This model is suitable for:
- Conversational movie assistants
- Bollywood-focused recommender systems
- Natural language Q&A over movie metadata
- Genre, mood, and similarity-based recommendation tools
Example Prompt
User:
I love magical action movies like Doctor Strange and Harry Potter. Can you suggest something similar from Bollywood?
Assistant:
You might enjoy Brahmāstra: Part One – Shiva (2022), directed by Ayan Mukerji. It is a fantasy action film rooted in Indian mythology, with supernatural elements and a superhero narrative.
Training Details
- Base Model:
stabilityai/stablelm-2-1_6b
- LoRA Configuration:
peft.LoraConfig(r=8, lora_alpha=32, target_modules=["q_proj", "v_proj"], lora_dropout=0.05)
- Frameworks Used:
transformers
,peft
, anddatasets
- Instruction Format:
User:
{user_query}
Assistant:
{response}
- Dataset Source: Derived from Bollywood Movie Dataset, with instruction–response pairs created via programmatic templates and Gemini API-assisted prompts.
Repository Files
adapter_config.json
: LoRA configuration fileadapter_model.safetensors
: Fine-tuned adapter weights- Tokenizer files from the base model
How to Use
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = "stabilityai/stablelm-2-1_6b"
lora_model = "first-techcraze/movie-recommender-v1"
tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(base_model, trust_remote_code=True)
model = PeftModel.from_pretrained(model, lora_model)
prompt = "### User:\nCan you recommend a light-hearted Bollywood romance like Barfi or Kal Ho Naa Ho?\n\n### Assistant:\n"
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Known Limitations
- The model is trained specifically on Bollywood movie data and may not generalize well to other film industries.
- Responses to unfamiliar or non-Bollywood queries may include hallucinations or irrelevant suggestions.
- The dataset may not reflect the most recent film releases from 2024 or 2025.
License
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Acknowledgments
- Dataset: Bollywood Movie Dataset
- Base Model: StableLM 2 1.6B
- Fine-tuning Framework: PEFT by Hugging Face
- Downloads last month
- 1
Model tree for first-techcraze/movie-recommender-v1
Base model
stabilityai/stablelm-2-1_6b