Instructions to use distributed/optimized-gpt2-1b-vtestnet-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use distributed/optimized-gpt2-1b-vtestnet-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="distributed/optimized-gpt2-1b-vtestnet-v2", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("distributed/optimized-gpt2-1b-vtestnet-v2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use distributed/optimized-gpt2-1b-vtestnet-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "distributed/optimized-gpt2-1b-vtestnet-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "distributed/optimized-gpt2-1b-vtestnet-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/distributed/optimized-gpt2-1b-vtestnet-v2
- SGLang
How to use distributed/optimized-gpt2-1b-vtestnet-v2 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 "distributed/optimized-gpt2-1b-vtestnet-v2" \ --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": "distributed/optimized-gpt2-1b-vtestnet-v2", "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 "distributed/optimized-gpt2-1b-vtestnet-v2" \ --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": "distributed/optimized-gpt2-1b-vtestnet-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use distributed/optimized-gpt2-1b-vtestnet-v2 with Docker Model Runner:
docker model run hf.co/distributed/optimized-gpt2-1b-vtestnet-v2
Epoch 5. Batch Size 464. Peers 3.
Browse files- config.json +1 -1
- model.safetensors +1 -1
- optimizer.pt +1 -1
config.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
"all_reduce_scores": {
|
| 5 |
"0": "SUCCESS",
|
| 6 |
"1": "SUCCESS",
|
| 7 |
-
"2": "
|
| 8 |
"3": "NON_PARTICIPATING",
|
| 9 |
"4": "SUCCESS",
|
| 10 |
"5": "NON_PARTICIPATING",
|
|
|
|
| 4 |
"all_reduce_scores": {
|
| 5 |
"0": "SUCCESS",
|
| 6 |
"1": "SUCCESS",
|
| 7 |
+
"2": "NON_PARTICIPATING",
|
| 8 |
"3": "NON_PARTICIPATING",
|
| 9 |
"4": "SUCCESS",
|
| 10 |
"5": "NON_PARTICIPATING",
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4040701744
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f48f3e2635ad1188156e0a0bb85b7da41901ee1ccfe74301d870d8c930ebd6ad
|
| 3 |
size 4040701744
|
optimizer.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 8081787874
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:85fd60c568128be07a4dfd56ed98090005561330758ecd45c8c073d0c3b08388
|
| 3 |
size 8081787874
|