Instructions to use mkurman/convgpt-v2-b200-full-synth-20h with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mkurman/convgpt-v2-b200-full-synth-20h with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mkurman/convgpt-v2-b200-full-synth-20h")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mkurman/convgpt-v2-b200-full-synth-20h", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mkurman/convgpt-v2-b200-full-synth-20h with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mkurman/convgpt-v2-b200-full-synth-20h" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mkurman/convgpt-v2-b200-full-synth-20h", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mkurman/convgpt-v2-b200-full-synth-20h
- SGLang
How to use mkurman/convgpt-v2-b200-full-synth-20h 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 "mkurman/convgpt-v2-b200-full-synth-20h" \ --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": "mkurman/convgpt-v2-b200-full-synth-20h", "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 "mkurman/convgpt-v2-b200-full-synth-20h" \ --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": "mkurman/convgpt-v2-b200-full-synth-20h", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mkurman/convgpt-v2-b200-full-synth-20h with Docker Model Runner:
docker model run hf.co/mkurman/convgpt-v2-b200-full-synth-20h
Upload checkpoint-60000 at step 60000
Browse files- checkpoint-60000/chat_template.jinja +93 -0
- checkpoint-60000/config.json +67 -0
- checkpoint-60000/generation_config.json +12 -0
- checkpoint-60000/model.safetensors +3 -0
- checkpoint-60000/optimizer.pt +3 -0
- checkpoint-60000/rng_state.pth +3 -0
- checkpoint-60000/scheduler.pt +3 -0
- checkpoint-60000/tokenizer.json +0 -0
- checkpoint-60000/tokenizer_config.json +21 -0
- checkpoint-60000/trainer_state.json +0 -0
- checkpoint-60000/training_args.bin +3 -0
checkpoint-60000/chat_template.jinja
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0].role == 'system' %}
|
| 4 |
+
{{- messages[0].content + '\n\n' }}
|
| 5 |
+
{%- endif %}
|
| 6 |
+
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 7 |
+
{%- for tool in tools %}
|
| 8 |
+
{{- "\n" }}
|
| 9 |
+
{{- tool | tojson }}
|
| 10 |
+
{%- endfor %}
|
| 11 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 12 |
+
{%- else %}
|
| 13 |
+
{%- if messages[0].role == 'system' %}
|
| 14 |
+
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
| 15 |
+
{%- endif %}
|
| 16 |
+
{%- endif %}
|
| 17 |
+
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 18 |
+
{%- for message in messages[::-1] %}
|
| 19 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 20 |
+
{%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
|
| 21 |
+
{%- set ns.multi_step_tool = false %}
|
| 22 |
+
{%- set ns.last_query_index = index %}
|
| 23 |
+
{%- endif %}
|
| 24 |
+
{%- endfor %}
|
| 25 |
+
{%- for message in messages %}
|
| 26 |
+
{%- if message.content is string %}
|
| 27 |
+
{%- set content = message.content %}
|
| 28 |
+
{%- else %}
|
| 29 |
+
{%- set content = '' %}
|
| 30 |
+
{%- endif %}
|
| 31 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
| 32 |
+
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
| 33 |
+
{%- elif message.role == "assistant" %}
|
| 34 |
+
{%- set reasoning_content = '' %}
|
| 35 |
+
{%- if message.reasoning_content is string %}
|
| 36 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 37 |
+
{%- else %}
|
| 38 |
+
{%- if '</think>' in content %}
|
| 39 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 40 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 41 |
+
{%- endif %}
|
| 42 |
+
{%- endif %}
|
| 43 |
+
|
| 44 |
+
{{- '<|im_start|>' + message.role }}
|
| 45 |
+
{% generation %}
|
| 46 |
+
{%- if loop.index0 > ns.last_query_index %}
|
| 47 |
+
{%- if loop.last or (not loop.last and reasoning_content) %}
|
| 48 |
+
{{- '<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
| 49 |
+
{%- else %}
|
| 50 |
+
{{- content }}
|
| 51 |
+
{%- endif %}
|
| 52 |
+
{%- else %}
|
| 53 |
+
{{- content }}
|
| 54 |
+
{%- endif %}
|
| 55 |
+
{%- if message.tool_calls %}
|
| 56 |
+
{%- for tool_call in message.tool_calls %}
|
| 57 |
+
{%- if (loop.first and content) or (not loop.first) %}
|
| 58 |
+
{{- '\n' }}
|
| 59 |
+
{%- endif %}
|
| 60 |
+
{%- if tool_call.function %}
|
| 61 |
+
{%- set tool_call = tool_call.function %}
|
| 62 |
+
{%- endif %}
|
| 63 |
+
{{- '<tool_call>\n{"name": "' }}
|
| 64 |
+
{{- tool_call.name }}
|
| 65 |
+
{{- '", "arguments": ' }}
|
| 66 |
+
{%- if tool_call.arguments is string %}
|
| 67 |
+
{{- tool_call.arguments }}
|
| 68 |
+
{%- else %}
|
| 69 |
+
{{- tool_call.arguments | tojson }}
|
| 70 |
+
{%- endif %}
|
| 71 |
+
{{- '}\n</tool_call>' }}
|
| 72 |
+
{%- endfor %}
|
| 73 |
+
{%- endif %}
|
| 74 |
+
{{- '<|im_end|>' }}
|
| 75 |
+
{% endgeneration %}
|
| 76 |
+
{%- elif message.role == "tool" %}
|
| 77 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 78 |
+
{{- '<|im_start|>user' }}
|
| 79 |
+
{%- endif %}
|
| 80 |
+
{{- '\n<tool_response>\n' }}
|
| 81 |
+
{{- content }}
|
| 82 |
+
{{- '\n</tool_response>' }}
|
| 83 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 84 |
+
{{- '<|im_end|>\n' }}
|
| 85 |
+
{%- endif %}
|
| 86 |
+
{%- endif %}
|
| 87 |
+
{%- endfor %}
|
| 88 |
+
{%- if add_generation_prompt %}
|
| 89 |
+
{{- '<|im_start|>assistant\n' }}
|
| 90 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 91 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 92 |
+
{%- endif %}
|
| 93 |
+
{%- endif %}
|
checkpoint-60000/config.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ConvGPTV2ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 1,
|
| 6 |
+
"branch_dropout": 0.01,
|
| 7 |
+
"chunk_memory_gate_init": -4.0,
|
| 8 |
+
"chunk_memory_include_current_chunk": false,
|
| 9 |
+
"chunk_memory_size": 64,
|
| 10 |
+
"chunk_memory_token_top_k": 64,
|
| 11 |
+
"chunk_memory_top_k": 2,
|
| 12 |
+
"conv1d_dilations": [
|
| 13 |
+
1,
|
| 14 |
+
2,
|
| 15 |
+
4,
|
| 16 |
+
8
|
| 17 |
+
],
|
| 18 |
+
"conv1d_kernel_size": 3,
|
| 19 |
+
"conv1d_residual_gate_init": -6.0,
|
| 20 |
+
"conv2d_backend": "triton_gather",
|
| 21 |
+
"conv2d_chunk_size": 1024,
|
| 22 |
+
"conv2d_dilations": [
|
| 23 |
+
1,
|
| 24 |
+
2,
|
| 25 |
+
4,
|
| 26 |
+
8
|
| 27 |
+
],
|
| 28 |
+
"conv2d_kernel_size": 3,
|
| 29 |
+
"conv2d_residual_gate_init": 2.0,
|
| 30 |
+
"conv_expand": 2,
|
| 31 |
+
"dropout": 0.01,
|
| 32 |
+
"dtype": "float32",
|
| 33 |
+
"eos_token_id": 32009,
|
| 34 |
+
"fusion": "gated",
|
| 35 |
+
"grid_size": 256,
|
| 36 |
+
"hidden_act": "silu",
|
| 37 |
+
"hidden_size": 512,
|
| 38 |
+
"initializer_range": 0.02,
|
| 39 |
+
"intermediate_size": 2048,
|
| 40 |
+
"max_grid_tokens": 65536,
|
| 41 |
+
"max_position_embeddings": 65536,
|
| 42 |
+
"model_type": "convgpt_v2",
|
| 43 |
+
"num_hidden_layers": 32,
|
| 44 |
+
"pack_order": "sequence_to_curve",
|
| 45 |
+
"packing": "hilbert",
|
| 46 |
+
"pad_token_id": 32000,
|
| 47 |
+
"position_embedding_type": "rope_nope",
|
| 48 |
+
"retrieval_dropout": 0.01,
|
| 49 |
+
"retrieval_every": 2,
|
| 50 |
+
"retrieval_num_heads": 4,
|
| 51 |
+
"retrieval_num_slots": 64,
|
| 52 |
+
"retrieval_top_k": 4,
|
| 53 |
+
"rms_norm_eps": 1e-06,
|
| 54 |
+
"rope_theta": 10000.0,
|
| 55 |
+
"router_rope_fraction": 1.0,
|
| 56 |
+
"router_type": "chunk_token_memory",
|
| 57 |
+
"tie_word_embeddings": true,
|
| 58 |
+
"transformers_version": "5.9.0",
|
| 59 |
+
"two_d_every": 1,
|
| 60 |
+
"two_d_start_layer": 0,
|
| 61 |
+
"use_1d_branch": true,
|
| 62 |
+
"use_2d_branch": true,
|
| 63 |
+
"use_2d_depthwise": true,
|
| 64 |
+
"use_cache": false,
|
| 65 |
+
"use_row_col_embeddings": false,
|
| 66 |
+
"vocab_size": 32024
|
| 67 |
+
}
|
checkpoint-60000/generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
32009
|
| 6 |
+
],
|
| 7 |
+
"output_attentions": false,
|
| 8 |
+
"output_hidden_states": false,
|
| 9 |
+
"pad_token_id": 32000,
|
| 10 |
+
"transformers_version": "5.9.0",
|
| 11 |
+
"use_cache": false
|
| 12 |
+
}
|
checkpoint-60000/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3a8f8ad65db2fb7eeb2c8d7d2286a49720137b11058ad8c853e737029f18e63
|
| 3 |
+
size 754664320
|
checkpoint-60000/optimizer.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe2b9f0672ee3987a933b2b41257d446bd30907f9c85a1efd734ef9bc9d6a154
|
| 3 |
+
size 1474773865
|
checkpoint-60000/rng_state.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3cabb31fe1b8262fb8ed2ee116c7550492db4667db3864d6abba39a6fdf4dfbe
|
| 3 |
+
size 14645
|
checkpoint-60000/scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6807a80b848a240d14d6dee93030c8498355b3e04438426ede52a0d8e46281d
|
| 3 |
+
size 1465
|
checkpoint-60000/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
checkpoint-60000/tokenizer_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": null,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"is_local": true,
|
| 8 |
+
"local_files_only": false,
|
| 9 |
+
"max_length": 2048,
|
| 10 |
+
"model_max_length": 19884624838656,
|
| 11 |
+
"pad_token": "<|pad|>",
|
| 12 |
+
"padding_side": "right",
|
| 13 |
+
"sp_model_kwargs": {},
|
| 14 |
+
"spaces_between_special_tokens": false,
|
| 15 |
+
"stride": 0,
|
| 16 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 17 |
+
"truncation_side": "right",
|
| 18 |
+
"truncation_strategy": "longest_first",
|
| 19 |
+
"unk_token": "<unk>",
|
| 20 |
+
"use_default_system_prompt": false
|
| 21 |
+
}
|
checkpoint-60000/trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
checkpoint-60000/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a600ff9566fa76c06ce93bcb2afa728fecbe14c105762b78716e10fb1dafc25
|
| 3 |
+
size 5457
|