Downloads · 30 days
0
alwayslate22/hain-recipe-model
hain-recipe-model is a machine learning model from alwayslate22. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
license: apache-2.0 basemodel: mistralai/Mistral-7B-Instruct-v0.2 tags: - filipino - recipes - cooking - meal-planning - tagalog - peft - lora language: - en - tl libraryname: peft ---
Downloads · 30 days
0
Access
Public
Updated Feb 3, 2026
Repo size
336 MB
Likes
0
Public
Click a slice to open those files.
.safetensors336 MB · 99%
From the Hugging Face model README
A fine-tuned Mistral 7B model specialized for Filipino recipe generation.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
import torch
# Load model
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
)
base_model = AutoModelForCausalLM.from_pretrained(
"mistralai/Mistral-7B-Instruct-v0.2",
quantization_config=bnb_config,
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, "alwayslate22/hain-recipe-model")
tokenizer = AutoTokenizer.from_pretrained("alwayslate22/hain-recipe-model")
# Generate
prompt = "<s>[INST] Give me the full JSON recipe for: Chicken Adobo (Filipino, Tagalog Dish). [/INST]"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=500)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Output Format
The model returns structured JSON:
{
"recipe_id": 1,
"title": "Chicken Adobo",
"cuisine": "Filipino",
"region": "Tagalog Dish",
"ingredients": [...],
"instructions": [...],
"cooking_time": "45 minutes",
"servings": 4,
"difficulty": "Easy"
}
Training
- Hardware: Google Colab T4 GPU
- Training Time: ~1 hour
- Epochs: 3
- Final Loss: ~0.25