akashdutta1030hr commited on
Upload merged Mistral-7B LoRA model
Browse files- chat_template.jinja +87 -0
- config.json +30 -0
- generation_config.json +6 -0
- logs/logs.jsonl +0 -0
- logs/predict_outputs.jsonl +4 -0
- miner_8092.log +68 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if messages[0]["role"] == "system" %}
|
| 2 |
+
{%- set system_message = messages[0]["content"] %}
|
| 3 |
+
{%- set loop_messages = messages[1:] %}
|
| 4 |
+
{%- else %}
|
| 5 |
+
{%- set loop_messages = messages %}
|
| 6 |
+
{%- endif %}
|
| 7 |
+
{%- if not tools is defined %}
|
| 8 |
+
{%- set tools = none %}
|
| 9 |
+
{%- endif %}
|
| 10 |
+
{%- set user_messages = loop_messages | selectattr("role", "equalto", "user") | list %}
|
| 11 |
+
|
| 12 |
+
{#- This block checks for alternating user/assistant messages, skipping tool calling messages #}
|
| 13 |
+
{%- set ns = namespace() %}
|
| 14 |
+
{%- set ns.index = 0 %}
|
| 15 |
+
{%- for message in loop_messages %}
|
| 16 |
+
{%- if not (message.role == "tool" or message.role == "tool_results" or (message.tool_calls is defined and message.tool_calls is not none)) %}
|
| 17 |
+
{%- if (message["role"] == "user") != (ns.index % 2 == 0) %}
|
| 18 |
+
{{- raise_exception("After the optional system message, conversation roles must alternate user/assistant/user/assistant/...") }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- set ns.index = ns.index + 1 %}
|
| 21 |
+
{%- endif %}
|
| 22 |
+
{%- endfor %}
|
| 23 |
+
|
| 24 |
+
{{- bos_token }}
|
| 25 |
+
{%- for message in loop_messages %}
|
| 26 |
+
{%- if message["role"] == "user" %}
|
| 27 |
+
{%- if tools is not none and (message == user_messages[-1]) %}
|
| 28 |
+
{{- "[AVAILABLE_TOOLS] [" }}
|
| 29 |
+
{%- for tool in tools %}
|
| 30 |
+
{%- set tool = tool.function %}
|
| 31 |
+
{{- '{"type": "function", "function": {' }}
|
| 32 |
+
{%- for key, val in tool.items() if key != "return" %}
|
| 33 |
+
{%- if val is string %}
|
| 34 |
+
{{- '"' + key + '": "' + val + '"' }}
|
| 35 |
+
{%- else %}
|
| 36 |
+
{{- '"' + key + '": ' + val|tojson }}
|
| 37 |
+
{%- endif %}
|
| 38 |
+
{%- if not loop.last %}
|
| 39 |
+
{{- ", " }}
|
| 40 |
+
{%- endif %}
|
| 41 |
+
{%- endfor %}
|
| 42 |
+
{{- "}}" }}
|
| 43 |
+
{%- if not loop.last %}
|
| 44 |
+
{{- ", " }}
|
| 45 |
+
{%- else %}
|
| 46 |
+
{{- "]" }}
|
| 47 |
+
{%- endif %}
|
| 48 |
+
{%- endfor %}
|
| 49 |
+
{{- "[/AVAILABLE_TOOLS]" }}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- if loop.last and system_message is defined %}
|
| 52 |
+
{{- "[INST] " + system_message + "\n\n" + message["content"] + "[/INST]" }}
|
| 53 |
+
{%- else %}
|
| 54 |
+
{{- "[INST] " + message["content"] + "[/INST]" }}
|
| 55 |
+
{%- endif %}
|
| 56 |
+
{%- elif message.tool_calls is defined and message.tool_calls is not none %}
|
| 57 |
+
{{- "[TOOL_CALLS] [" }}
|
| 58 |
+
{%- for tool_call in message.tool_calls %}
|
| 59 |
+
{%- set out = tool_call.function|tojson %}
|
| 60 |
+
{{- out[:-1] }}
|
| 61 |
+
{%- if not tool_call.id is defined or tool_call.id|length != 9 %}
|
| 62 |
+
{{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
|
| 63 |
+
{%- endif %}
|
| 64 |
+
{{- ', "id": "' + tool_call.id + '"}' }}
|
| 65 |
+
{%- if not loop.last %}
|
| 66 |
+
{{- ", " }}
|
| 67 |
+
{%- else %}
|
| 68 |
+
{{- "]" + eos_token }}
|
| 69 |
+
{%- endif %}
|
| 70 |
+
{%- endfor %}
|
| 71 |
+
{%- elif message["role"] == "assistant" %}
|
| 72 |
+
{{- " " + message["content"]|trim + eos_token}}
|
| 73 |
+
{%- elif message["role"] == "tool_results" or message["role"] == "tool" %}
|
| 74 |
+
{%- if message.content is defined and message.content.content is defined %}
|
| 75 |
+
{%- set content = message.content.content %}
|
| 76 |
+
{%- else %}
|
| 77 |
+
{%- set content = message.content %}
|
| 78 |
+
{%- endif %}
|
| 79 |
+
{{- '[TOOL_RESULTS] {"content": ' + content|string + ", " }}
|
| 80 |
+
{%- if not message.tool_call_id is defined or message.tool_call_id|length != 9 %}
|
| 81 |
+
{{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
|
| 82 |
+
{%- endif %}
|
| 83 |
+
{{- '"call_id": "' + message.tool_call_id + '"}[/TOOL_RESULTS]' }}
|
| 84 |
+
{%- else %}
|
| 85 |
+
{{- raise_exception("Only user and assistant roles are supported, with the exception of an initial optional system message!") }}
|
| 86 |
+
{%- endif %}
|
| 87 |
+
{%- endfor %}
|
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"MistralForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"dtype": "float16",
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"head_dim": 128,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 14336,
|
| 14 |
+
"max_position_embeddings": 32768,
|
| 15 |
+
"model_type": "mistral",
|
| 16 |
+
"num_attention_heads": 32,
|
| 17 |
+
"num_hidden_layers": 32,
|
| 18 |
+
"num_key_value_heads": 8,
|
| 19 |
+
"pad_token_id": null,
|
| 20 |
+
"rms_norm_eps": 1e-05,
|
| 21 |
+
"rope_parameters": {
|
| 22 |
+
"rope_theta": 1000000.0,
|
| 23 |
+
"rope_type": "default"
|
| 24 |
+
},
|
| 25 |
+
"sliding_window": null,
|
| 26 |
+
"tie_word_embeddings": false,
|
| 27 |
+
"transformers_version": "5.2.0",
|
| 28 |
+
"use_cache": true,
|
| 29 |
+
"vocab_size": 32768
|
| 30 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"transformers_version": "5.2.0"
|
| 6 |
+
}
|
logs/logs.jsonl
ADDED
|
File without changes
|
logs/predict_outputs.jsonl
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"success": true, "model": "axon", "utterance": {"index": "f9a68a0f-872f-4249-9035-5b555c1047b4", "step": 0, "prefix": "Clarity", "prediction": "...", "context": "(no prior utterances)", "done": false, "ground_truth": null, "evaluation": null}, "error": null, "context_used": "(no prior utterances)", "complete": true}
|
| 2 |
+
{"success": true, "model": "axon", "utterance": {"index": "f9a68a0f-872f-4249-9035-5b555c1047b4", "step": 1, "prefix": "Clarity and", "prediction": "...", "context": "(no prior utterances)", "done": false, "ground_truth": null, "evaluation": null}, "error": null, "context_used": "(no prior utterances)", "complete": true}
|
| 3 |
+
{"success": true, "model": "axon", "utterance": {"index": "f9a68a0f-872f-4249-9035-5b555c1047b4", "step": 2, "prefix": "Clarity and empathy,", "prediction": "...", "context": "(no prior utterances)", "done": false, "ground_truth": null, "evaluation": null}, "error": null, "context_used": "(no prior utterances)", "complete": true}
|
| 4 |
+
{"success": true, "model": "axon", "utterance": {"index": "f9a68a0f-872f-4249-9035-5b555c1047b4", "step": 3, "prefix": "Clarity and empathy, yes,", "prediction": "...", "context": "(no prior utterances)", "done": false, "ground_truth": null, "evaluation": null}, "error": null, "context_used": "(no prior utterances)", "complete": true}
|
miner_8092.log
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
2026-03-06 01:42:49,774 - __main__ - INFO - ============================================================
|
| 2 |
+
2026-03-06 01:42:49,774 - __main__ - INFO - Starting Babelbit Miner Server
|
| 3 |
+
2026-03-06 01:42:49,774 - __main__ - INFO - Backend: Hugging Face
|
| 4 |
+
2026-03-06 01:42:49,774 - __main__ - INFO - ============================================================
|
| 5 |
+
2026-03-06 01:42:49,774 - __main__ - INFO -
|
| 6 |
+
2026-03-06 01:42:49,774 - __main__ - WARNING - π DEV MODE ENABLED - Bittensor verification DISABLED
|
| 7 |
+
2026-03-06 01:42:49,774 - __main__ - WARNING - This should ONLY be used for local testing!
|
| 8 |
+
2026-03-06 01:42:49,774 - __main__ - WARNING - Set MINER_DEV_MODE=0 for production use.
|
| 9 |
+
2026-03-06 01:42:49,774 - __main__ - INFO -
|
| 10 |
+
2026-03-06 01:42:49,774 - __main__ - INFO - β οΈ Make sure you've registered your axon first:
|
| 11 |
+
2026-03-06 01:42:49,774 - __main__ - INFO - uv run python babelbit/miner/register_axon.py
|
| 12 |
+
2026-03-06 01:42:49,774 - __main__ - INFO -
|
| 13 |
+
2026-03-06 01:42:49,774 - __main__ - INFO - π Production mode: MINER_EXTERNAL_IP=216.81.245.239
|
| 14 |
+
2026-03-06 01:42:49,774 - __main__ - INFO - Server accessible at: http://216.81.245.239:8092
|
| 15 |
+
2026-03-06 01:42:49,775 - __main__ - INFO - π Miner serving predictions on port 8092
|
| 16 |
+
2026-03-06 01:42:49,775 - __main__ - INFO - Press Ctrl+C to stop.
|
| 17 |
+
2026-03-06 01:42:49,775 - __main__ - INFO -
|
| 18 |
+
INFO: Started server process [311701]
|
| 19 |
+
INFO: Waiting for application startup.
|
| 20 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Model: /root/workspace/babelbit_subnet/fine_tuning/fine_tuned_model/merged
|
| 21 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Revision: main
|
| 22 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Cache dir: /root/.babelbit/models
|
| 23 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Quantization: 8bit=False, 4bit=False
|
| 24 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Device: cuda
|
| 25 |
+
2026-03-06 01:42:49,782 - __main__ - INFO -
|
| 26 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Initialized BabelbitMiner with model: /root/workspace/babelbit_subnet/fine_tuning/fine_tuned_model/merged
|
| 27 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Target device: cuda, dtype: torch.float16
|
| 28 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Loading model...
|
| 29 |
+
2026-03-06 01:42:49,782 - __main__ - INFO - Loading model /root/workspace/babelbit_subnet/fine_tuning/fine_tuned_model/merged...
|
| 30 |
+
2026-03-06 01:42:49,783 - babelbit.miner.model_loader - INFO - Loading tokenizer for /root/workspace/babelbit_subnet/fine_tuning/fine_tuned_model/merged...
|
| 31 |
+
2026-03-06 01:42:50,252 - babelbit.miner.model_loader - INFO - Loading model /root/workspace/babelbit_subnet/fine_tuning/fine_tuned_model/merged...
|
| 32 |
+
|
| 33 |
+
2026-03-06 01:43:07,759 - babelbit.miner.model_loader - INFO - Model loaded successfully on cuda
|
| 34 |
+
2026-03-06 01:43:07,760 - babelbit.miner.model_loader - INFO - Model memory footprint: 28.99 GB
|
| 35 |
+
2026-03-06 01:43:07,761 - __main__ - INFO - Model loaded successfully on cuda
|
| 36 |
+
2026-03-06 01:43:07,761 - __main__ - INFO - β
Model loaded successfully
|
| 37 |
+
2026-03-06 01:43:07,761 - __main__ - INFO -
|
| 38 |
+
INFO: Application startup complete.
|
| 39 |
+
INFO: Uvicorn running on http://0.0.0.0:8092 (Press CTRL+C to quit)
|
| 40 |
+
INFO: 127.0.0.1:45000 - "GET /healthz HTTP/1.1" 200 OK
|
| 41 |
+
2026-03-06 01:43:14,128 - __main__ - INFO - π Dev mode enabled - bypassing Bittensor verification
|
| 42 |
+
2026-03-06 01:43:14,128 - __main__ - INFO - Generating prediction for prefix: 'Clarity'
|
| 43 |
+
2026-03-06 01:43:14,128 - __main__ - INFO - Using context: ''
|
| 44 |
+
2026-03-06 01:43:21,332 - __main__ - ERROR - Error moving model to device: CUDA out of memory. Tried to allocate 224.00 MiB. GPU 0 has a total capacity of 23.53 GiB of which 112.62 MiB is free. Including non-PyTorch memory, this process has 23.41 GiB memory in use. Of the allocated memory 23.03 GiB is allocated by PyTorch, and 1.16 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
|
| 45 |
+
2026-03-06 01:43:33,940 - __main__ - INFO - Fell back to CPU device
|
| 46 |
+
2026-03-06 01:43:33,941 - __main__ - WARNING - Prediction timed out in dev mode; returning empty prediction
|
| 47 |
+
INFO: 127.0.0.1:43426 - "POST /predict HTTP/1.1" 200 OK
|
| 48 |
+
2026-03-06 01:43:33,946 - __main__ - INFO - π Dev mode enabled - bypassing Bittensor verification
|
| 49 |
+
2026-03-06 01:43:33,946 - __main__ - INFO - Generating prediction for prefix: 'Clarity and'
|
| 50 |
+
2026-03-06 01:43:33,946 - __main__ - INFO - Using context: ''
|
| 51 |
+
The attention mask is not set and cannot be inferred from input because pad token is same as eos token. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
|
| 52 |
+
2026-03-06 01:43:43,946 - __main__ - WARNING - Prediction timed out in dev mode; returning empty prediction
|
| 53 |
+
INFO: 127.0.0.1:43426 - "POST /predict HTTP/1.1" 200 OK
|
| 54 |
+
2026-03-06 01:43:44,014 - __main__ - INFO - π Dev mode enabled - bypassing Bittensor verification
|
| 55 |
+
2026-03-06 01:43:44,014 - __main__ - INFO - Generating prediction for prefix: 'Clarity and empathy,'
|
| 56 |
+
2026-03-06 01:43:44,014 - __main__ - INFO - Using context: ''
|
| 57 |
+
2026-03-06 01:43:54,014 - __main__ - WARNING - Prediction timed out in dev mode; returning empty prediction
|
| 58 |
+
INFO: 127.0.0.1:43426 - "POST /predict HTTP/1.1" 200 OK
|
| 59 |
+
2026-03-06 01:43:54,019 - __main__ - INFO - π Dev mode enabled - bypassing Bittensor verification
|
| 60 |
+
2026-03-06 01:43:54,020 - __main__ - INFO - Generating prediction for prefix: 'Clarity and empathy, yes,'
|
| 61 |
+
2026-03-06 01:43:54,020 - __main__ - INFO - Using context: ''
|
| 62 |
+
2026-03-06 01:44:04,021 - __main__ - WARNING - Prediction timed out in dev mode; returning empty prediction
|
| 63 |
+
INFO: 127.0.0.1:43426 - "POST /predict HTTP/1.1" 200 OK
|
| 64 |
+
2026-03-06 01:44:04,030 - __main__ - INFO - π Dev mode enabled - bypassing Bittensor verification
|
| 65 |
+
2026-03-06 01:44:04,031 - __main__ - INFO - Generating prediction for prefix: 'Clarity and empathy, yes, but'
|
| 66 |
+
2026-03-06 01:44:04,031 - __main__ - INFO - Using context: ''
|
| 67 |
+
INFO: Shutting down
|
| 68 |
+
INFO: Finished server process [311701]
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d78cf0f928549185c855a95cb3fa8fc0a33c7bc824fcc47106bbbf3044c27117
|
| 3 |
+
size 14496080848
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"is_local": false,
|
| 8 |
+
"legacy": false,
|
| 9 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 10 |
+
"pad_token": null,
|
| 11 |
+
"sp_model_kwargs": {},
|
| 12 |
+
"spaces_between_special_tokens": false,
|
| 13 |
+
"tokenizer_class": "TokenizersBackend",
|
| 14 |
+
"unk_token": "<unk>",
|
| 15 |
+
"use_default_system_prompt": false
|
| 16 |
+
}
|