Instructions to use CrossBaseArithmetic/arithmetic-model-L2_H16_D64 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CrossBaseArithmetic/arithmetic-model-L2_H16_D64 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CrossBaseArithmetic/arithmetic-model-L2_H16_D64")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CrossBaseArithmetic/arithmetic-model-L2_H16_D64") model = AutoModelForCausalLM.from_pretrained("CrossBaseArithmetic/arithmetic-model-L2_H16_D64", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CrossBaseArithmetic/arithmetic-model-L2_H16_D64 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CrossBaseArithmetic/arithmetic-model-L2_H16_D64" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CrossBaseArithmetic/arithmetic-model-L2_H16_D64", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CrossBaseArithmetic/arithmetic-model-L2_H16_D64
- SGLang
How to use CrossBaseArithmetic/arithmetic-model-L2_H16_D64 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 "CrossBaseArithmetic/arithmetic-model-L2_H16_D64" \ --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": "CrossBaseArithmetic/arithmetic-model-L2_H16_D64", "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 "CrossBaseArithmetic/arithmetic-model-L2_H16_D64" \ --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": "CrossBaseArithmetic/arithmetic-model-L2_H16_D64", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CrossBaseArithmetic/arithmetic-model-L2_H16_D64 with Docker Model Runner:
docker model run hf.co/CrossBaseArithmetic/arithmetic-model-L2_H16_D64
Training in progress, epoch 1
Browse files- config.json +34 -0
- generation_config.json +12 -0
- model.safetensors +3 -0
- tokenizer.json +117 -0
- tokenizer_config.json +10 -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": 64,
|
| 16 |
+
"n_head": 16,
|
| 17 |
+
"n_inner": 256,
|
| 18 |
+
"n_layer": 2,
|
| 19 |
+
"n_positions": 256,
|
| 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.0.0",
|
| 32 |
+
"use_cache": false,
|
| 33 |
+
"vocab_size": 23
|
| 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.0.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:3a88f4c1cf6c7fe56ada6150584c41f94ae767dcb1978cc1a54166fb8c4c8696
|
| 3 |
+
size 474440
|
tokenizer.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"0": 6,
|
| 98 |
+
"1": 7,
|
| 99 |
+
"2": 8,
|
| 100 |
+
"3": 9,
|
| 101 |
+
"4": 10,
|
| 102 |
+
"5": 11,
|
| 103 |
+
"6": 12,
|
| 104 |
+
"7": 13,
|
| 105 |
+
"8": 14,
|
| 106 |
+
"9": 15,
|
| 107 |
+
"=": 16,
|
| 108 |
+
"A": 17,
|
| 109 |
+
"B": 18,
|
| 110 |
+
"C": 19,
|
| 111 |
+
"D": 20,
|
| 112 |
+
"E": 21,
|
| 113 |
+
"F": 22
|
| 114 |
+
},
|
| 115 |
+
"unk_token": "<unk>"
|
| 116 |
+
}
|
| 117 |
+
}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<bos>",
|
| 4 |
+
"eos_token": "<eos>",
|
| 5 |
+
"is_local": false,
|
| 6 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 7 |
+
"pad_token": "<pad>",
|
| 8 |
+
"tokenizer_class": "TokenizersBackend",
|
| 9 |
+
"unk_token": "<unk>"
|
| 10 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:223f0602317a451ff6b6a8a701eb29ca18f7d8eae137e5f4cd17a7d0f66534d1
|
| 3 |
+
size 5265
|