Instructions to use KoboldAI/GPT-Neo-2.7B-Horni-LN with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KoboldAI/GPT-Neo-2.7B-Horni-LN with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KoboldAI/GPT-Neo-2.7B-Horni-LN")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KoboldAI/GPT-Neo-2.7B-Horni-LN") model = AutoModelForCausalLM.from_pretrained("KoboldAI/GPT-Neo-2.7B-Horni-LN") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use KoboldAI/GPT-Neo-2.7B-Horni-LN with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KoboldAI/GPT-Neo-2.7B-Horni-LN" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KoboldAI/GPT-Neo-2.7B-Horni-LN", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KoboldAI/GPT-Neo-2.7B-Horni-LN
- SGLang
How to use KoboldAI/GPT-Neo-2.7B-Horni-LN 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 "KoboldAI/GPT-Neo-2.7B-Horni-LN" \ --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": "KoboldAI/GPT-Neo-2.7B-Horni-LN", "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 "KoboldAI/GPT-Neo-2.7B-Horni-LN" \ --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": "KoboldAI/GPT-Neo-2.7B-Horni-LN", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KoboldAI/GPT-Neo-2.7B-Horni-LN with Docker Model Runner:
docker model run hf.co/KoboldAI/GPT-Neo-2.7B-Horni-LN
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.9998882806390348, | |
| "global_step": 4475, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.11, | |
| "learning_rate": 5e-06, | |
| "loss": 2.6919, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.22, | |
| "learning_rate": 5e-06, | |
| "loss": 2.6575, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 0.34, | |
| "learning_rate": 5e-06, | |
| "loss": 2.6454, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 0.45, | |
| "learning_rate": 5e-06, | |
| "loss": 2.6269, | |
| "step": 2000 | |
| }, | |
| { | |
| "epoch": 0.56, | |
| "learning_rate": 5e-06, | |
| "loss": 2.6225, | |
| "step": 2500 | |
| }, | |
| { | |
| "epoch": 0.67, | |
| "learning_rate": 5e-06, | |
| "loss": 2.6239, | |
| "step": 3000 | |
| }, | |
| { | |
| "epoch": 0.78, | |
| "learning_rate": 5e-06, | |
| "loss": 2.6038, | |
| "step": 3500 | |
| }, | |
| { | |
| "epoch": 0.89, | |
| "learning_rate": 5e-06, | |
| "loss": 2.6016, | |
| "step": 4000 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 4475, | |
| "total_flos": 2.3326754909779395e+18, | |
| "train_runtime": 42410.7529, | |
| "train_samples_per_second": 0.106 | |
| } | |
| ], | |
| "max_steps": 4475, | |
| "num_train_epochs": 1, | |
| "total_flos": 2.3326754909779395e+18, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |