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")# pip install -U transformers accelerate # 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 filesFiles changed (3)
- config.json+4-4
- model.safetensors+1-1
- training_args.bin+1-1
3 unmodified lines456789101112135 unmodified lines19202122232425262728293 unmodified lines"architectures": ["GPT2LMHeadModel"],"attn_pdrop": 0.1,"bos_token_id": 1,"dtype": "float32","embd_pdrop": 0.1,"eos_token_id": 2,"initializer_range": 0.02,"layer_norm_epsilon": 1e-05,5 unmodified lines"n_positions": 128,"pad_token_id": 0,"reorder_and_upcast_attn": false,"resid_pdrop": 0.1,"scale_attn_by_inverse_layer_idx": false,"scale_attn_weights": true,"summary_activation": null,"summary_first_dropout": 0.1,"summary_proj_to_labels": true,"summary_type": "cls_index","summary_use_proj": true,3 unmodified lines456789101112135 unmodified lines19202122232425262728293 unmodified lines"architectures": ["GPT2LMHeadModel"],"attn_pdrop": 0.0,"bos_token_id": 1,"dtype": "float32","embd_pdrop": 0.0,"eos_token_id": 2,"initializer_range": 0.02,"layer_norm_epsilon": 1e-05,5 unmodified lines"n_positions": 128,"pad_token_id": 0,"reorder_and_upcast_attn": false,"resid_pdrop": 0.0,"scale_attn_by_inverse_layer_idx": false,"scale_attn_weights": true,"summary_activation": null,"summary_first_dropout": 0.0,"summary_proj_to_labels": true,"summary_type": "cls_index","summary_use_proj": true,
123version https://git-lfs.github.com/spec/v1oid sha256:46b9a4f5d790932d47995a67503c734133e8430c47df6739c6f93cba7f4e1a51size 2459928123version https://git-lfs.github.com/spec/v1oid sha256:fcd3fc00dc434cb1c11c92a719213a3760d89e0d5d6f57e618cb73884c0beff0size 2459928
123version https://git-lfs.github.com/spec/v1oid sha256:a5e7aa7b0107b58140a408650ddcabe122e79507296a2a6c70315e16d2fbdf2bsize 5329123version https://git-lfs.github.com/spec/v1oid sha256:6ab081a8027025abd55183a3e848cf8b07c375353fda3ce697fc32a73f357c02size 5329
config.json+4-4
model.safetensors+1-1
training_args.bin+1-1