Instructions to use arithmetic-circuit-overloading/gpt2-128D-3L-4H with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arithmetic-circuit-overloading/gpt2-128D-3L-4H with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arithmetic-circuit-overloading/gpt2-128D-3L-4H")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("arithmetic-circuit-overloading/gpt2-128D-3L-4H") model = AutoModelForCausalLM.from_pretrained("arithmetic-circuit-overloading/gpt2-128D-3L-4H", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arithmetic-circuit-overloading/gpt2-128D-3L-4H with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arithmetic-circuit-overloading/gpt2-128D-3L-4H" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arithmetic-circuit-overloading/gpt2-128D-3L-4H", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arithmetic-circuit-overloading/gpt2-128D-3L-4H
- SGLang
How to use arithmetic-circuit-overloading/gpt2-128D-3L-4H 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 "arithmetic-circuit-overloading/gpt2-128D-3L-4H" \ --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": "arithmetic-circuit-overloading/gpt2-128D-3L-4H", "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 "arithmetic-circuit-overloading/gpt2-128D-3L-4H" \ --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": "arithmetic-circuit-overloading/gpt2-128D-3L-4H", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arithmetic-circuit-overloading/gpt2-128D-3L-4H with Docker Model Runner:
docker model run hf.co/arithmetic-circuit-overloading/gpt2-128D-3L-4H
Training in progress, epoch 1
Browse files- config.json +4 -4
- model.safetensors +1 -1
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
| 6 |
],
|
| 7 |
-
"attn_pdrop": 0.
|
| 8 |
"bos_token_id": 1,
|
| 9 |
"dtype": "float32",
|
| 10 |
-
"embd_pdrop": 0.
|
| 11 |
"eos_token_id": 2,
|
| 12 |
"initializer_range": 0.02,
|
| 13 |
"layer_norm_epsilon": 1e-05,
|
|
@@ -19,11 +19,11 @@
|
|
| 19 |
"n_positions": 128,
|
| 20 |
"pad_token_id": 0,
|
| 21 |
"reorder_and_upcast_attn": false,
|
| 22 |
-
"resid_pdrop": 0.
|
| 23 |
"scale_attn_by_inverse_layer_idx": false,
|
| 24 |
"scale_attn_weights": true,
|
| 25 |
"summary_activation": null,
|
| 26 |
-
"summary_first_dropout": 0.
|
| 27 |
"summary_proj_to_labels": true,
|
| 28 |
"summary_type": "cls_index",
|
| 29 |
"summary_use_proj": true,
|
|
|
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
| 6 |
],
|
| 7 |
+
"attn_pdrop": 0.0,
|
| 8 |
"bos_token_id": 1,
|
| 9 |
"dtype": "float32",
|
| 10 |
+
"embd_pdrop": 0.0,
|
| 11 |
"eos_token_id": 2,
|
| 12 |
"initializer_range": 0.02,
|
| 13 |
"layer_norm_epsilon": 1e-05,
|
|
|
|
| 19 |
"n_positions": 128,
|
| 20 |
"pad_token_id": 0,
|
| 21 |
"reorder_and_upcast_attn": false,
|
| 22 |
+
"resid_pdrop": 0.0,
|
| 23 |
"scale_attn_by_inverse_layer_idx": false,
|
| 24 |
"scale_attn_weights": true,
|
| 25 |
"summary_activation": null,
|
| 26 |
+
"summary_first_dropout": 0.0,
|
| 27 |
"summary_proj_to_labels": true,
|
| 28 |
"summary_type": "cls_index",
|
| 29 |
"summary_use_proj": true,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2459928
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcd3fc00dc434cb1c11c92a719213a3760d89e0d5d6f57e618cb73884c0beff0
|
| 3 |
size 2459928
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5329
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6ab081a8027025abd55183a3e848cf8b07c375353fda3ce697fc32a73f357c02
|
| 3 |
size 5329
|