Instructions to use arithmetic-circuit-overloading/gpt2-32D-3L-8H with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arithmetic-circuit-overloading/gpt2-32D-3L-8H with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arithmetic-circuit-overloading/gpt2-32D-3L-8H", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("arithmetic-circuit-overloading/gpt2-32D-3L-8H") model = AutoModelForCausalLM.from_pretrained("arithmetic-circuit-overloading/gpt2-32D-3L-8H", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arithmetic-circuit-overloading/gpt2-32D-3L-8H 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-32D-3L-8H" # 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-32D-3L-8H", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arithmetic-circuit-overloading/gpt2-32D-3L-8H
- SGLang
How to use arithmetic-circuit-overloading/gpt2-32D-3L-8H 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-32D-3L-8H" \ --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-32D-3L-8H", "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-32D-3L-8H" \ --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-32D-3L-8H", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arithmetic-circuit-overloading/gpt2-32D-3L-8H with Docker Model Runner:
docker model run hf.co/arithmetic-circuit-overloading/gpt2-32D-3L-8H
Training in progress, epoch 1
Browse files- config.json +34 -0
- generation_config.json +12 -0
- model.safetensors +3 -0
- tokenizer.json +114 -0
- tokenizer_config.json +11 -0
- training_args.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_function": "gelu_new",
|
| 3 |
+
"add_cross_attention": false,
|
| 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,
|
| 14 |
+
"model_type": "gpt2",
|
| 15 |
+
"n_embd": 32,
|
| 16 |
+
"n_head": 8,
|
| 17 |
+
"n_inner": 128,
|
| 18 |
+
"n_layer": 3,
|
| 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,
|
| 30 |
+
"tie_word_embeddings": true,
|
| 31 |
+
"transformers_version": "5.12.0",
|
| 32 |
+
"use_cache": false,
|
| 33 |
+
"vocab_size": 20
|
| 34 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
2
|
| 6 |
+
],
|
| 7 |
+
"output_attentions": false,
|
| 8 |
+
"output_hidden_states": false,
|
| 9 |
+
"pad_token_id": 0,
|
| 10 |
+
"transformers_version": "5.12.0",
|
| 11 |
+
"use_cache": true
|
| 12 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04d02014d233894cdd16a43263dc2181d72db89e23ea81413d1217f5f7f3527f
|
| 3 |
+
size 175376
|
tokenizer.json
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
| 4 |
+
"padding": {
|
| 5 |
+
"strategy": "BatchLongest",
|
| 6 |
+
"direction": "Left",
|
| 7 |
+
"pad_to_multiple_of": null,
|
| 8 |
+
"pad_id": 0,
|
| 9 |
+
"pad_type_id": 0,
|
| 10 |
+
"pad_token": "<pad>"
|
| 11 |
+
},
|
| 12 |
+
"added_tokens": [
|
| 13 |
+
{
|
| 14 |
+
"id": 0,
|
| 15 |
+
"content": "<pad>",
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"lstrip": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"special": true
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"id": 1,
|
| 24 |
+
"content": "<bos>",
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"lstrip": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"normalized": false,
|
| 29 |
+
"special": true
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"id": 2,
|
| 33 |
+
"content": "<eos>",
|
| 34 |
+
"single_word": false,
|
| 35 |
+
"lstrip": false,
|
| 36 |
+
"rstrip": false,
|
| 37 |
+
"normalized": false,
|
| 38 |
+
"special": true
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"id": 3,
|
| 42 |
+
"content": "<unk>",
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"lstrip": false,
|
| 45 |
+
"rstrip": false,
|
| 46 |
+
"normalized": false,
|
| 47 |
+
"special": true
|
| 48 |
+
}
|
| 49 |
+
],
|
| 50 |
+
"normalizer": null,
|
| 51 |
+
"pre_tokenizer": {
|
| 52 |
+
"type": "Split",
|
| 53 |
+
"pattern": {
|
| 54 |
+
"Regex": "[\\s\\S]"
|
| 55 |
+
},
|
| 56 |
+
"behavior": "Isolated",
|
| 57 |
+
"invert": false
|
| 58 |
+
},
|
| 59 |
+
"post_processor": {
|
| 60 |
+
"type": "TemplateProcessing",
|
| 61 |
+
"single": [
|
| 62 |
+
{
|
| 63 |
+
"Sequence": {
|
| 64 |
+
"id": "A",
|
| 65 |
+
"type_id": 0
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
],
|
| 69 |
+
"pair": [
|
| 70 |
+
{
|
| 71 |
+
"Sequence": {
|
| 72 |
+
"id": "A",
|
| 73 |
+
"type_id": 0
|
| 74 |
+
}
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"Sequence": {
|
| 78 |
+
"id": "B",
|
| 79 |
+
"type_id": 1
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
],
|
| 83 |
+
"special_tokens": {}
|
| 84 |
+
},
|
| 85 |
+
"decoder": {
|
| 86 |
+
"type": "Fuse"
|
| 87 |
+
},
|
| 88 |
+
"model": {
|
| 89 |
+
"type": "WordLevel",
|
| 90 |
+
"vocab": {
|
| 91 |
+
"<pad>": 0,
|
| 92 |
+
"<bos>": 1,
|
| 93 |
+
"<eos>": 2,
|
| 94 |
+
"<unk>": 3,
|
| 95 |
+
"\n": 4,
|
| 96 |
+
"*": 5,
|
| 97 |
+
"+": 6,
|
| 98 |
+
"-": 7,
|
| 99 |
+
"/": 8,
|
| 100 |
+
"0": 9,
|
| 101 |
+
"1": 10,
|
| 102 |
+
"2": 11,
|
| 103 |
+
"3": 12,
|
| 104 |
+
"4": 13,
|
| 105 |
+
"5": 14,
|
| 106 |
+
"6": 15,
|
| 107 |
+
"7": 16,
|
| 108 |
+
"8": 17,
|
| 109 |
+
"9": 18,
|
| 110 |
+
"=": 19
|
| 111 |
+
},
|
| 112 |
+
"unk_token": "<unk>"
|
| 113 |
+
}
|
| 114 |
+
}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<bos>",
|
| 4 |
+
"eos_token": "<eos>",
|
| 5 |
+
"is_local": false,
|
| 6 |
+
"local_files_only": false,
|
| 7 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 8 |
+
"pad_token": "<pad>",
|
| 9 |
+
"tokenizer_class": "TokenizersBackend",
|
| 10 |
+
"unk_token": "<unk>"
|
| 11 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2af080ad216f7a216bd65c7bd41c8bc6aabdd37e31a620c06e6db9870526ef94
|
| 3 |
+
size 5329
|