Instructions to use prathamesh0710/cinephile-mistral-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prathamesh0710/cinephile-mistral-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prathamesh0710/cinephile-mistral-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("prathamesh0710/cinephile-mistral-lora", device_map="auto") - PEFT
How to use prathamesh0710/cinephile-mistral-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prathamesh0710/cinephile-mistral-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prathamesh0710/cinephile-mistral-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prathamesh0710/cinephile-mistral-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prathamesh0710/cinephile-mistral-lora
- SGLang
How to use prathamesh0710/cinephile-mistral-lora 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 "prathamesh0710/cinephile-mistral-lora" \ --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": "prathamesh0710/cinephile-mistral-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "prathamesh0710/cinephile-mistral-lora" \ --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": "prathamesh0710/cinephile-mistral-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prathamesh0710/cinephile-mistral-lora with Docker Model Runner:
docker model run hf.co/prathamesh0710/cinephile-mistral-lora
Cinephile Mistral LoRA
This model is a LoRA (Low-Rank Adaptation) fine-tuned adapter built on top of Mistral-7B-Instruct v0.2 to generate responses in the style of a cinephile โ emotionally aware, analytical, and expressive about films.
Important Note
This repository contains ONLY LoRA adapter weights, not the full model.
- This model cannot run independently
- You must load the base model first and then apply this adapter
Base Model
Model: mistralai/Mistral-7B-Instruct-v0.2
Type: Instruction-tuned large language model
Parameters: ~7B
What This Model Does
After applying this adapter, the model:
- Recommends movies with deeper reasoning
- Analyzes themes, emotions, and storytelling
- Responds like a cinephile or film critic
- Uses expressive and immersive language
Requirements
pip install transformers peft accelerate torch
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_name = "mistralai/Mistral-7B-Instruct-v0.2"
lora_model_name = "prathamesh0710/cinephile-mistral-lora"
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.float16,
device_map="auto"
)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, lora_model_name)
# Format prompt
def format_prompt(user_input):
return f"<s>[INST] {user_input} [/INST]"
# Optional: stronger cinephile personality
# def format_prompt(user_input):
# return f"<s>[INST] You are a passionate cinephile. {user_input} [/INST]"
# Run inference
prompt = format_prompt("Suggest a movie like Fight Club")
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.7,
top_p=0.9
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Performance Tips
- Use GPU (CUDA) for best performance
- Use float16 to reduce memory usage
Tune:
temperatureโ creativitytop_pโ diversitymax_new_tokensโ response length
Training Details
- Method: LoRA (QLoRA, 4-bit)
- Dataset Size: ~2,279 samples
- ~2,000 movie-related
- ~279 personality-based
- Goal: Style tuning (cinephile personality), not knowledge expansion
Limitations
- Not a full movie knowledge base
- May hallucinate details
- Focuses more on tone and expression than factual accuracy
Why LoRA Instead of Full Model
- Much smaller (~100MB vs ~13GB)
- Faster to load
- Easier to fine-tune
- Requires base model to run
Summary
This is a lightweight cinephile personality layer on top of Mistral.
Mistral โ but speaking like a film critic.
Acknowledgements
- Base model: Mistral AI
- Fine-tuning: LoRA using Hugging Face ecosystem
Model tree for prathamesh0710/cinephile-mistral-lora
Base model
mistralai/Mistral-7B-Instruct-v0.2