Instructions to use anezatra/gpt2-medium-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anezatra/gpt2-medium-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anezatra/gpt2-medium-chat")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("anezatra/gpt2-medium-chat") model = AutoModelForCausalLM.from_pretrained("anezatra/gpt2-medium-chat") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use anezatra/gpt2-medium-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anezatra/gpt2-medium-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anezatra/gpt2-medium-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/anezatra/gpt2-medium-chat
- SGLang
How to use anezatra/gpt2-medium-chat 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 "anezatra/gpt2-medium-chat" \ --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": "anezatra/gpt2-medium-chat", "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 "anezatra/gpt2-medium-chat" \ --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": "anezatra/gpt2-medium-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use anezatra/gpt2-medium-chat with Docker Model Runner:
docker model run hf.co/anezatra/gpt2-medium-chat
GPT-2 355M
Model Description
GPT-2 355M stands out as a highly effective tool in the field of natural language processing. With 355 million parameters, this model adopts deep learning techniques and possesses a vast knowledge of language. GPT-2 355M, which can be used in various tasks such as text generation, text completion, translation, and text classification, attracts attention with its broad applicability and high accuracy level. Researchers and practitioners effectively utilize this model in NLP projects, achieving success in various text-based tasks.
AGI (Artificial General Intelligence) Type Model
This model is an AGI model because it performs at a level close to human intelligence in a general sense, rather than being limited to a specific domain. AGI has the ability to solve complex problems, learn, and adapt across various domains. Unlike other artificial intelligence models, AGI encompasses a wide range of cognitive abilities and can transition between different tasks.
Authors
- Developed by: Anezatra
- Model type: GPT2 (AGI)
- Contacts: https://github.com/anezatra
- Downloads last month
- 6
docker model run hf.co/anezatra/gpt2-medium-chat