Instructions to use herutriana44/foodgpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use herutriana44/foodgpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="herutriana44/foodgpt")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("herutriana44/foodgpt") model = AutoModelForCausalLM.from_pretrained("herutriana44/foodgpt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use herutriana44/foodgpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "herutriana44/foodgpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "herutriana44/foodgpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/herutriana44/foodgpt
- SGLang
How to use herutriana44/foodgpt 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 "herutriana44/foodgpt" \ --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": "herutriana44/foodgpt", "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 "herutriana44/foodgpt" \ --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": "herutriana44/foodgpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use herutriana44/foodgpt with Docker Model Runner:
docker model run hf.co/herutriana44/foodgpt
Fine-tuned GPT-2 on Food Technology Markdown Dataset
This model is a fine-tuned version of gpt2 on a custom dataset containing markdown documents about food technology, including drying, bioseparation, and R&D topics.
Intended Use
The model is designed for educational and exploratory use cases around food processing and engineering text generation.
How to Use
from transformers import pipeline
generator = pipeline("text-generation", model="herutriana44/foodgpt", tokenizer="herutriana44/foodgpt")
generator("What is drying in food technology?", do_sample=True, max_new_tokens=100, top_k=50, top_p=0.95, repetition_penalty=1.2)
output :
[{'generated_text': "What is drying in food technology?\nA dryer can be a great solution for maintaining your fridge's capacity. If you want to keep it warm and on the go, there are several options: A large-scale (elevated) refrigerator or an open container storage system such as freezer bags with no bottoms; glass jars that work well but have plastic backings so they don't cling when opened by hand while still being ableto store water under pressure at room temperature over extended periods of time โ especially if done right!"}]
Dataset
Custom markdown documents from food-tech related content.
License
MIT License
- Downloads last month
- 23
Model tree for herutriana44/foodgpt
Base model
openai-community/gpt2