Instructions to use joackimagno/MASID-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use joackimagno/MASID-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="joackimagno/MASID-v3")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("joackimagno/MASID-v3") model = AutoModelForCausalLM.from_pretrained("joackimagno/MASID-v3") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use joackimagno/MASID-v3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "joackimagno/MASID-v3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joackimagno/MASID-v3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/joackimagno/MASID-v3
- SGLang
How to use joackimagno/MASID-v3 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 "joackimagno/MASID-v3" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joackimagno/MASID-v3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "joackimagno/MASID-v3" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joackimagno/MASID-v3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio new
How to use joackimagno/MASID-v3 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for joackimagno/MASID-v3 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for joackimagno/MASID-v3 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for joackimagno/MASID-v3 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="joackimagno/MASID-v3", max_seq_length=2048, ) - Docker Model Runner
How to use joackimagno/MASID-v3 with Docker Model Runner:
docker model run hf.co/joackimagno/MASID-v3
MASID-v3
MASID-v3 is a fine-tuned version of Qwen2.5-7B trained specifically for Filipino recipe generation, with a focus on main dish preparation.
This model was trained on the Filipino Recipes 2K V2 dataset, a curated collection of ~2,000 authentic Filipino recipes.
Unlike earlier variants that explored multi-stage fine-tuning, MASID-v3 was trained directly from Qwen2.5-7B using this dataset to specialize the model toward Filipino culinary knowledge.
The goal of MASID-v3 is to generate structured and culturally accurate Filipino main dish recipes, covering a wide range of traditional cooking methods and ingredient combinations.
Model Details
- Base Model: Qwen2.5-7B
- Dataset: Filipino Recipes 2K V2 (~2,000 samples)
- Training Objective: Recipe text generation (Filipino cuisine, main dishes)
- Method: Direct fine-tuning from Qwen2.5-7B
Intended Use
- Assisting in recipe writing
- Exploring Filipino food culture
- Generating cooking instructions in natural language
Limitations
- The model was trained on a relatively small dataset (~2k samples).
- May sometimes produce hallucinated ingredients or inaccurate cooking steps.
- Not suitable for use as a nutritional or food safety reference.
- Best used for research, education, and creative applications.
Evaluation
| Dataset | Split | BLEU-4 | METEOR | ROUGE-L (F1) |
|---|---|---|---|---|
| joackimagno/FILIPINO_RECIPES_2K_V2 | test | 0.07 | 0.35 | 0.32 |
This Qwen2 model was trained 2× faster with Unsloth and Hugging Face’s TRL library.
Example Usage
from typing import List
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
# Load model and tokenizer
model_name = "joackimagno/MASID-v3"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto",
)
# ==============================================================
# Alpaca-style prompt
# ==============================================================
SYSTEM_INSTRUCTION = (
"You are a Filipino chef. Generate Filipino MAIN DISH recipes.\n"
"Follow these output rules:\n"
"1) Use standard stovetop or oven methods.\n"
"2) Keep steps concise and logically ordered.\n"
"3) Output FORMAT and ORDER must be exactly:\n"
" Recipe name, Prep time, Cook time, Total time, Servings,\n"
" Full Ingredients (numbered list), Instructions (numbered list)"
)
ALPACA_TEMPLATE = (
"Below is an instruction that describes a task, paired with an input that "
"provides further context. Write a response that appropriately completes the request.\n\n"
"### Instruction:\n{}\n\n### Input:\n{}\n\n### Response:\n{}"
)
def make_model_input_from_ing(ing_names: List[str]) -> str:
return (
"Ingredients to use: " + ", ".join(ing_names) + ".\n"
"Task: create a Filipino main dish recipe using these ingredients. "
"Keep steps concise, clear, and coherent."
)
# Example input
ing_names = ["Beef", "Potato", "Sili", "Carrot", "Sayote"]
alpaca_prompt = ALPACA_TEMPLATE.format(
SYSTEM_INSTRUCTION,
make_model_input_from_ing(ing_names),
"" # leave response empty for model to generate
)
# ==============================================================
# Run inference
# ==============================================================
inputs = tokenizer(alpaca_prompt, return_tensors="pt").to(model.device)
gen_config = GenerationConfig(
max_new_tokens=512,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
outputs = model.generate(**inputs, generation_config=gen_config)
generated = tokenizer.decode(
outputs[0][inputs["input_ids"].shape[1]:],
skip_special_tokens=True
)
print(generated.strip())
- Downloads last month
- 5
Model tree for joackimagno/MASID-v3
Dataset used to train joackimagno/MASID-v3
Evaluation results
- BLEU-4 on joackimagno/FILIPINO_RECIPES_2K_V2test set self-reported0.070
- METEOR on joackimagno/FILIPINO_RECIPES_2K_V2test set self-reported0.350
- ROUGE-L (F1) on joackimagno/FILIPINO_RECIPES_2K_V2test set self-reported0.320
