Instructions to use EleutherAI/gpt-neo-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EleutherAI/gpt-neo-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EleutherAI/gpt-neo-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-125m") model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-125m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use EleutherAI/gpt-neo-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EleutherAI/gpt-neo-125m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EleutherAI/gpt-neo-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EleutherAI/gpt-neo-125m
- SGLang
How to use EleutherAI/gpt-neo-125m 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 "EleutherAI/gpt-neo-125m" \ --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": "EleutherAI/gpt-neo-125m", "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 "EleutherAI/gpt-neo-125m" \ --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": "EleutherAI/gpt-neo-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EleutherAI/gpt-neo-125m with Docker Model Runner:
docker model run hf.co/EleutherAI/gpt-neo-125m
Tensorflow Model Variant
This discussion was created to request the creation of the Tensorflow Class 'TFGPTNeoModel'.
I would like help in converting to TensorFlow format for further analysis and use in a TensorFlow-based application. I understand that converting a PyTorch model to TensorFlow format can be a challenging task, and it requires a thorough understanding of both frameworks. However, I believe that this conversion would be beneficial in terms of using the PyTorch model in a TensorFlow-based application and to the TensorFlow community.
Therefore, I kindly request your support in converting the PyTorch model into TensorFlow format. I would greatly appreciate your expertise in this matter and any guidance you can provide.
Thank you for your time and consideration. I look forward to hearing from you soon.
Sincerely,
William.