--- license: llama3.2 base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 tags: - food - nutrition - parsing - health - on-device - ios - fine-tuned - mlx - apple-silicon language: - en datasets: - custom --- # GutSignal Food Parsing Model (MLX Format) Fine-tuned language model for parsing food descriptions into structured data. **Optimized for Apple Silicon in MLX format.** ## Model Description This model is fine-tuned to parse natural language food descriptions and extract: - Individual ingredients - Food categories (dairy, grains, protein, vegetables, etc.) - Beverage classification - Dairy content detection - Estimated nutritional information ## Intended Use - **Primary Use**: On-device food parsing for health tracking applications - **Target Platform**: iOS devices with Apple Silicon (iPhone 15+) - **Format**: MLX (Apple's machine learning framework) - **Privacy**: Designed for offline, on-device inference ## Training Data The model was fine-tuned on: - Food journal entries, USDA FoodData Central, Open Food Facts ## Usage ### iOS/macOS (MLX) This model is in MLX format and ready for Apple Silicon devices: ```python import mlx.core as mx from mlx_lm import load, generate # Load model model, tokenizer = load("YOUR_USERNAME/gutsync_food_analysis_tinyllama-1.1b") # Generate prompt = '''### Instruction: Parse the following food description and extract structured data. ### Input: chicken salad with ranch dressing ### Output: ''' response = generate(model, tokenizer, prompt=prompt, max_tokens=256) print(response) ``` ### iOS App Integration This model can be downloaded and used directly in iOS apps using the MLXLMCommon framework. See the [GutSignal app](https://github.com/ndlanier/poop.io-ios) for a complete example. ## Output Format ```json { "ingredients": ["chicken", "lettuce", "ranch dressing"], "categories": ["protein", "vegetables", "fats"], "is_beverage": false, "contains_dairy": true, "estimated_calories": 450 } ``` ## Categories The model classifies food into these categories: - dairy, grains, protein, vegetables, fruits - fats, sugars, beverages, spicy, fiber - processed, caffeine, alcohol, fermented - nuts, legumes, unknown ## Training Details - **Base Model**: TinyLlama/TinyLlama-1.1B-Chat-v1.0 - **Fine-tuning Method**: LoRA (Low-Rank Adaptation) - **Training Framework**: PyTorch + Transformers - **Conversion**: Converted to MLX format for Apple Silicon optimization - **Format**: MLX safetensors (float16) - **Optimization**: Efficient for on-device inference on Apple devices ## Limitations - Estimates only - not for medical decisions - Best performance on common foods - May struggle with very complex dishes or regional cuisines - Calorie estimates are approximate ## Ethical Considerations - This model is for informational purposes only - Not a substitute for professional nutritional advice - Should not be used for medical diagnosis or treatment decisions - Designed with privacy-first principles (on-device processing) ## License This model inherits the license from its base model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 ## Citation If you use this model, please cite: ```bibtex @misc{gutsignal-food-parser, author = {Your Name}, title = {GutSignal Food Parsing Model}, year = {2026}, publisher = {Hugging Face}, howpublished = {\url{https://huggingface.co/YOUR_USERNAME/gutsync_food_analysis_tinyllama-1.1b}} } ```