Text Generation
Transformers
PyTorch
Safetensors
English
gpt_neox
causal-lm
pythia
pythia_v0
text-generation-inference
Instructions to use EleutherAI/pythia-1b-deduped-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EleutherAI/pythia-1b-deduped-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EleutherAI/pythia-1b-deduped-v0", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-1b-deduped-v0") model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-1b-deduped-v0", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EleutherAI/pythia-1b-deduped-v0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EleutherAI/pythia-1b-deduped-v0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EleutherAI/pythia-1b-deduped-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EleutherAI/pythia-1b-deduped-v0
- SGLang
How to use EleutherAI/pythia-1b-deduped-v0 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/pythia-1b-deduped-v0" \ --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/pythia-1b-deduped-v0", "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/pythia-1b-deduped-v0" \ --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/pythia-1b-deduped-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EleutherAI/pythia-1b-deduped-v0 with Docker Model Runner:
docker model run hf.co/EleutherAI/pythia-1b-deduped-v0
Upload config.json
Browse files- config.json +3 -2
config.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"architectures": [
|
| 3 |
"GPTNeoXForCausalLM"
|
| 4 |
],
|
| 5 |
-
"bos_token_id":
|
| 6 |
"eos_token_id": 0,
|
| 7 |
"hidden_act": "gelu",
|
| 8 |
"hidden_size": 2048,
|
|
@@ -17,7 +17,8 @@
|
|
| 17 |
"rotary_pct": 0.25,
|
| 18 |
"tie_word_embeddings": false,
|
| 19 |
"torch_dtype": "float16",
|
| 20 |
-
"transformers_version": "4.
|
| 21 |
"use_cache": true,
|
|
|
|
| 22 |
"vocab_size": 50304
|
| 23 |
}
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"GPTNeoXForCausalLM"
|
| 4 |
],
|
| 5 |
+
"bos_token_id": 0,
|
| 6 |
"eos_token_id": 0,
|
| 7 |
"hidden_act": "gelu",
|
| 8 |
"hidden_size": 2048,
|
|
|
|
| 17 |
"rotary_pct": 0.25,
|
| 18 |
"tie_word_embeddings": false,
|
| 19 |
"torch_dtype": "float16",
|
| 20 |
+
"transformers_version": "4.24.0",
|
| 21 |
"use_cache": true,
|
| 22 |
+
"use_parallel_residual": true,
|
| 23 |
"vocab_size": 50304
|
| 24 |
}
|