Instructions to use globalnebula/NM-GMED-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use globalnebula/NM-GMED-1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-8B") model = PeftModel.from_pretrained(base_model, "globalnebula/NM-GMED-1") - Transformers
How to use globalnebula/NM-GMED-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="globalnebula/NM-GMED-1")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("globalnebula/NM-GMED-1", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use globalnebula/NM-GMED-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "globalnebula/NM-GMED-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "globalnebula/NM-GMED-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/globalnebula/NM-GMED-1
- SGLang
How to use globalnebula/NM-GMED-1 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 "globalnebula/NM-GMED-1" \ --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": "globalnebula/NM-GMED-1", "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 "globalnebula/NM-GMED-1" \ --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": "globalnebula/NM-GMED-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use globalnebula/NM-GMED-1 with Docker Model Runner:
docker model run hf.co/globalnebula/NM-GMED-1
Model Card for NutriGNN — Drug–Food Pharmacological Mapping LLM
NutriGNN is a multimodal, safety-aware biomedical reasoning model fine-tuned on the Meta-Llama-3-8B base using Parameter-Efficient Fine-Tuning (PEFT) with LoRA adapters.
It functions as an explainable AI assistant for drug–food interaction analysis, personalized nutritional recommendation, and biomedical report generation, grounded in a heterogeneous knowledge graph and graph neural embeddings.
Model Details
Model Description
NutriGNN integrates Graph Neural Networks (GNNs) with a Large Language Model reasoning layer to align pharmaceutical drug effects with nutraceutical and food-derived compounds.
The system performs cross-domain embedding alignment, safety constraint filtering (allergies, diseases, contraindications), and natural-language explanation/recipe generation.
- Developed by: S Kunal Achintya Reddy
- Model Type: Biomedical reasoning and recommendation LLM
- Languages: English
- License: MIT
- Fine-tuned from model: meta-llama/Meta-Llama-3-8B
- Frameworks: PyTorch, PEFT, Hugging Face Transformers, PyTorch Geometric
- Version: 1.0 (2026)
NutriGNN is designed as a decision-support system, not a clinical diagnostic tool.
Uses
Direct Use
NutriGNN can be used directly for:
- Drug → food compound mapping and analog discovery
- Personalized dietary recommendations with safety filters
- Contraindication and side-effect explanation generation
- Biomedical recipe generation and structured reports
- Conversational health copilots and educational assistants
Downstream Use
- Domain adaptation for clinical nutrition or pharmacy analytics
- Integration into healthcare dashboards or wellness platforms
- Embedding as an explainability layer in biomedical RAG systems
Out-of-Scope Use
- Automated medical diagnosis or treatment decisions
- Emergency or critical care decision-making
- Processing personal health data without consent
- Replacing licensed healthcare professionals
Bias, Risks, and Limitations
- Outputs depend on the quality and coverage of biomedical datasets used during training.
- The model may underperform in rare drug–food interactions or niche medical domains.
- Not a certified medical advisor; recommendations require professional validation.
- Language and regional dietary diversity may affect accuracy.
Recommendations
Users and developers should:
- Treat NutriGNN as decision support, not authoritative medical advice.
- Enable safety filters (allergy and contraindication modules) during deployment.
- Periodically retrain or fine-tune with updated biomedical datasets.
- Combine with human oversight in clinical or regulated environments.
Training Details
Training Data
NutriGNN was trained on a curated biomedical corpus composed of:
- Public pharmacological datasets (drug–target relations)
- Nutraceutical and food compound datasets
- Biomedical literature summaries and ontology mappings
- Synthetic reasoning dialogues and recipe generation prompts
- Structured knowledge graph triples for cross-domain alignment
All data used was publicly available, synthetic, or anonymized.
Training Procedure
Preprocessing
- Data normalized into structured triplets: context → biochemical reasoning → safe recommendation
- Ontology mapping and duplicate removal
- Contraindication and allergy tags injected as control tokens
- Recipe and explanation prompts standardized into instruction format
Training Hyperparameters
- Base model: Meta-Llama-3-8B
- Fine-tuning: LoRA (r=32, alpha=16, dropout=0.05)
- Batch size: 32–64
- Learning rate: 2e-4
- Optimizer: AdamW
- Precision: bf16 mixed precision
- Epochs: 4–6
- Context length: 4096 tokens
- Training hardware: NVIDIA A100 GPU (80GB)
Speeds, Sizes, Times
- Trainable parameters: ~110M
- Adapter checkpoint size: ~2–3 GB
- Average training throughput: ~380 tokens/sec
- Total training time: ~11.8 GPU hours
- Estimated training cost: $21.63 USD
(Equivalent to ~11–12 hours on a single A100 GPU instance at ~$1.8–2.0/hr spot pricing)
Evaluation Metrics
| Metric | Purpose |
|---|---|
| Precision@K | Food analog retrieval quality |
| AUROC / AUPRC | Side-effect and target prediction |
| Cosine Similarity Threshold | Pharmacological alignment validity |
| Acceptance Rate | Recipe biological coherence |
| Zero-Shot Accuracy | Generalization to unseen drugs |
| Human Evaluation | Interpretability and clarity |
System Architecture

Ethical and Safety Considerations
NutriGNN includes safety-aware reasoning modules, but:
- It does not replace medical professionals.
- It should not be used for regulated clinical decisions without validation.
- Developers should implement consent, logging, and explainability layers.
Intended Deployment Contexts
- Research prototypes and academic studies
- Educational healthcare tools
- Nutritional planning assistants
- Biomedical RAG or graph-augmented reasoning systems
Not recommended for emergency or high-risk medical scenarios.
Citation
If you use this model in academic work:
@misc{nutrignn2026, title={NutriGNN: Graph–Language Modeling for Drug–Food Bioactivity Alignment}, author={S. Kunal Achintya Reddy}, year={2026}, note={Hugging Face Model Repository} }
License
MIT License — free for research and commercial use with attribution.
Final Note
NutriGNN bridges computational pharmacology and nutritional intelligence by combining graph-based reasoning with generative language models, enabling safer and more interpretable biomedical decision-support systems.
- Downloads last month
- 2
Model tree for globalnebula/NM-GMED-1
Base model
meta-llama/Meta-Llama-3-8B