Downloads · 30 days
5
5% of all-time downloads
Shreyasjani/nutribrain-mistral7b-merged
nutribrain-mistral7b-merged is a text generation model from Shreyasjani. Use it when you need the model to write or continue text. It is set up for transformers.
NutriBrain is a fine-tuned Mistral-7B model designed to convert natural language meal logging into structured JSON output.
Downloads · 30 days
5
5% of all-time downloads
All-time downloads
91
Public
Parameters
7.2B
14.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors14.5 GB · 100%
From the Hugging Face model README
NutriBrain is a fine-tuned Mistral-7B model designed to convert natural language meal logging into structured JSON output.
The model is optimized for:
It is trained to output clean machine-readable JSON for downstream nutrition systems.
The model converts user messages like:
Log lunch: 4 rotis (24g each), 150g dal, 130g sabzi
Into structured JSON:
{ "intent": "log_meal", "meal_type": "lunch", "items": [ {"food_name": "Roti", "grams": 96}, {"food_name": "Dal", "grams": 150}, {"food_name": "Sabzi", "grams": 130} ] }
It is optimized to:
Suitable for:
Not intended for:
Data focused on:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "Shreyasjani/nutribrain-mistral7b-merged"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
prompt = "Return ONLY JSON.\n\nLog dinner: 150g paneer, 110g cooked brown rice"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.1,
do_sample=False
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Recommended settings:
Recommended:
Minimum GPU:
Shreyas Jani
Fintech & AI Systems Builder
Hugging Face: https://huggingface.co/Shreyasjani