Downloads · 30 days
0
KrishnaHuYaar/Fitness-Mistral-7B-Instruct-v0.1
Fitness-Mistral-7B-Instruct-v0.1 is a text generation model from KrishnaHuYaar. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Fitness-Mistral-7B-Instruct-v0.1 is a specialized fine-tune of the Mistral 7B model, designed to act as a personalized fitness and nutrition assistant. It was trained 2x faster using Unsloth and Hugging Face's TRL lib…
Downloads · 30 days
0
Access
Public
Updated Jan 10, 2026
Parameters
7.5B
4.1 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors4.1 GB · 100%
How the weights are stored.
U87.2B · 96%
From the Hugging Face model README
Fitness-Mistral-7B-Instruct-v0.1 is a specialized fine-tune of the Mistral 7B model, designed to act as a personalized fitness and nutrition assistant. It was trained 2x faster using Unsloth and Hugging Face's TRL library. This model takes user biometrics (Age, Gender, Height, Weight) and goals to generate structured workout routines, diet plans, and equipment recommendations.
For the best results, you must use the specific prompt format below. The model expects the User Details block to generate a coherent response.
[INST] You are a fitness assistant.
User Details:
Sex: {Sex}
Age: {Age}
Height: {Height} cm
Weight: {Weight} kg
Fitness Goal: {Goal}
Generate a personalized fitness plan with clear headings:
- Equipment Required
- Exercise Plan
- Diet Plan
- Additional Recommendations [/INST]
import requests
API_URL = "[https://api-inference.huggingface.co/models/KrishnaHuYaar/Fitness-Mistral-7B-Instruct-v0.1](https://api-inference.huggingface.co/models/KrishnaHuYaar/Fitness-Mistral-7B-Instruct-v0.1)"
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
payload = {
"inputs": """[INST] You are a fitness assistant.
User Details:
Sex: Female
Age: 30
Height: 165 cm
Weight: 60 kg
Fitness Goal: Weight Loss
Generate a personalized fitness plan with clear headings:
- Equipment Required
- Exercise Plan
- Diet Plan
- Additional Recommendations [/INST]"""
}
response = requests.post(API_URL, headers=headers, json=payload)
print(response.json())
First install this library
pip install torch transformers accelerate
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the model
model_name = "KrishnaHuYaar/Fitness-Mistral-7B-Instruct-v0.1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto"
)
# Define the generation function
def generate_plan(sex, age, height, weight, goal):
prompt = f"""[INST] You are a fitness assistant.
User Details:
Sex: {sex}
Age: {age}
Height: {height} cm
Weight: {weight} kg
Fitness Goal: {goal}
Generate a personalized fitness plan with clear headings:
- Equipment Required
- Exercise Plan
- Diet Plan
- Additional Recommendations [/INST]"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=500,
do_sample=True,
temperature=0.7
)
return tokenizer.decode(outputs[0], skip_special_tokens=True).split("[/INST]")[-1]
# Example Usage
print(generate_plan("Male", 25, 175, 70, "Muscle Gain"))
<div align="center">
<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>
</div>
<br>