Downloads Β· 30 days
9
5% of all-time downloads
bhxvxsh/recipeai-ultra-performance
recipeai-ultra-performance is a reinforcement learning model from bhxvxsh. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for stable-baselines3. The card lists the license as mit.
π BREAKTHROUGH: 100% satisfaction on all nutrients in live testing!
Downloads Β· 30 days
9
5% of all-time downloads
All-time downloads
164
Public
Repo size
4.5 MB
Likes
0
Public
Click a slice to open those files.
.zip3 MB Β· 65%
From the Hugging Face model README
π BREAKTHROUGH: 100% satisfaction on all nutrients in live testing!
This is an ultra-performance reinforcement learning model for generating personalized recipes for diabetic patients. The model uses PPO (Proximal Policy Optimization) with a novel fat-focused curriculum learning approach to achieve publication-ready performance.
| Nutrient | Satisfaction | Target |
|---|---|---|
| Calories | 100.0% | β₯85% β |
| Protein | 100.0% | β₯85% β |
| Fat | 100.0% | β₯85% β |
| Carbs | 100.0% | β₯85% β |
| Sodium | 100.0% | β₯85% β |
| Overall | 100.0% | β₯85% β |
Average Reward: +214.4
| Nutrient | Satisfaction |
|---|---|
| Calories | 89.5% |
| Protein | 65.5% |
| Fat | 74.5% |
| Carbs | 98.0% |
| Sodium | 78.5% |
| Overall | 81.2% |
Average Reward: +537.08
NUTRIENT_IMPORTANCE = {
'fat': 0.35, # Increased from 0.25 (critical improvement)
'calories': 0.18,
'protein': 0.18,
'carbs': 0.19,
'sodium': 0.10
}
# Fat-specific optimizations
FAT_EXPONENTIAL_FACTOR = 2.0 # vs 1.5 for others
FAT_SATISFACTION_BONUS = 100 # Extra reward
FAT_BONUS_MULTIPLIER = 2.0 # Double rewards
learning_rate: 3e-4
n_steps: 2048
batch_size: 128
n_epochs: 15
gamma: 0.99
gae_lambda: 0.95
clip_range: 0.2
ent_coef: 0.15 (annealed to 0.005)
vf_coef: 0.5
max_grad_norm: 0.5
Generating personalized, nutritionally-balanced recipes for diabetic patients that satisfy multiple constraints:
pip install stable-baselines3 gymnasium numpy pandas
from stable_baselines3 import PPO
from stable_baselines3.common.vec_env import VecNormalize
# Load the model
model = PPO.load("ultra_performance_final.zip")
# For normalized environments, also load normalization stats
vec_normalize = VecNormalize.load("vec_normalize_ultra.pkl", env)
# Generate recipes
obs = env.reset()
for _ in range(10): # Generate 10 ingredients
action, _states = model.predict(obs, deterministic=True)
obs, reward, done, info = env.step(action)
if done:
break
See the GitHub repository for complete usage examples:
scripts/quick_test.py - Live recipe generationscripts/comprehensive_model_analysis.py - Full evaluationDatasets Used:
Nutrients Tracked: Calories, Protein, Fat, Carbohydrates, Sodium
The model achieved breakthrough performance by addressing the fat constraint bottleneck through:
| Model | Training | Overall | Fat | Reward | Time |
|---|---|---|---|---|---|
| Baseline | 100k | 89.0% | 60.0% | +76.5 | 10 min |
| Curriculum v2 | 700k | 70.0% | 10.0% β | -78.6 | 14 min |
| Ultra-Perf | 800k | 100.0% | 100.0% β | +214.4 | 16 min |
See the analysis results for comprehensive visualizations:
@software{recipeai_ultraperformance_2026,
title={RecipeAI Ultra-Performance Model: Reinforcement Learning for Diabetic Recipe Generation},
author={Bhavesh},
year={2026},
url={https://huggingface.co/bhxvxshh/recipeai-ultra-performance},
note={100% satisfaction on all nutrients through fat-focused curriculum learning}
}
License: MIT