Run this model with HF Jobs
Run anezatra/gpt2-medium-chat on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/anezatra/gpt2-medium-chat. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/anezatra/gpt2-medium-chat on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/anezatra/gpt2-medium-chat. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/anezatra/gpt2-medium-chat. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("anezatra/gpt2-medium-chat") model = AutoModelForCausalLM.from_pretrained("anezatra/gpt2-medium-chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("anezatra/gpt2-medium-chat")
model = AutoModelForCausalLM.from_pretrained("anezatra/gpt2-medium-chat", device_map="auto")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
- 10
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anezatra/gpt2-medium-chat")