Instructions to use iBossonline/RegesCore-1.0-35 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use iBossonline/RegesCore-1.0-35 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("iBossonline/RegesCore-1.0-35", device_map="auto") - llama-cpp-python
How to use iBossonline/RegesCore-1.0-35 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="iBossonline/RegesCore-1.0-35", filename="BF16/Ornith-1.0-35B-BF16-00001-of-00002.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use iBossonline/RegesCore-1.0-35 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Use Docker
docker model run hf.co/iBossonline/RegesCore-1.0-35:UD-Q4_K_M
- LM Studio
- Jan
- Ollama
How to use iBossonline/RegesCore-1.0-35 with Ollama:
ollama run hf.co/iBossonline/RegesCore-1.0-35:UD-Q4_K_M
- Unsloth Studio
How to use iBossonline/RegesCore-1.0-35 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for iBossonline/RegesCore-1.0-35 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for iBossonline/RegesCore-1.0-35 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for iBossonline/RegesCore-1.0-35 to start chatting
- Pi
How to use iBossonline/RegesCore-1.0-35 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "iBossonline/RegesCore-1.0-35:UD-Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use iBossonline/RegesCore-1.0-35 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use iBossonline/RegesCore-1.0-35 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "iBossonline/RegesCore-1.0-35:UD-Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use iBossonline/RegesCore-1.0-35 with Docker Model Runner:
docker model run hf.co/iBossonline/RegesCore-1.0-35:UD-Q4_K_M
- Lemonade
How to use iBossonline/RegesCore-1.0-35 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull iBossonline/RegesCore-1.0-35:UD-Q4_K_M
Run and chat with the model
lemonade run user.RegesCore-1.0-35-UD-Q4_K_M
List all available models
lemonade list
---
library_name: transformers
license: mit
base_model: deepreinforce-ai/Ornith-1.0-9B
pipeline_tag: text-generation
tags:
- gemma2
- unsloth
- qlora
- cybersecurity
- reverse-engineering
- redm
- fivem
- devops
- gguf
---
🦅 Ornith-1.0-9B-Mastermind (GGUF)
Ornith-1.0-9B-Mastermind is a highly specialized, locally deployable 9-billion parameter AI model fine-tuned specifically for elite systems engineering, ethical security research, and advanced game server architecture.
Built on top of the Ornith-1.0 coding agent base, this model has been heavily fine-tuned to adopt the "Ai Mastermind" persona. It is optimized to operate in high-context command-line agent environments and is designed to provide robust, uncensored technical reasoning for complex local development workflows.
🧠 Fine-Tuning Data & Model Focus
This model was explicitly fine-tuned on a curated dataset targeting senior-level architectural design, low-level reverse engineering, and bare-metal infrastructure. The training data focused on the following core domains:
1. Offensive Security & Reverse Engineering (The Armory)
- Recon & Exploitation: Metasploit Framework, Burp Suite, SQLmap, Hashcat, Nmap.
- Reverse Engineering & Forensics: Ghidra, Radare2, x64dbg, Frida dynamic instrumentation, Wireshark, malware analysis, and exploit analysis.
- Defensive Infrastructure: Wazuh (SIEM/XDR), Suricata, Zeek, eBPF telemetry, and secure routing (WireGuard, Tailscale, Cloudflare Tunnels).
- Security Operations: Penetration testing methodology, threat modeling, Active Directory auditing (BloodHound), and Kubernetes scanning (Kube-hunter, Trivy).
2. Low-Level & Systems Programming
- Languages: C/C++ (manual memory management, ABI stability, POSIX APIs), Rust (borrow checker semantics, zero-cost abstractions, unsafe block auditing), and Go (goroutines, GC tuning).
- Embedded Runtimes: Deep expertise in Lua 5.1/5.4 and LuaJIT, specifically tailored for RedM and FiveM multiplayer game server ecosystems (QBCore, ESX, VorpCore, VCore).
- Memory & State: Coroutines, direct memory manipulation, metatables, and server-side thread management.
3. Cloud Architecture & Bare-Metal Operations
- Infrastructure: Bare-metal server deployment, self-hosted PaaS solutions (Coolify), reverse proxies (Nginx, Caddy), and Linux kernel parameter tuning.
- Databases: PostgreSQL, Redis, ClickHouse, and vector databases. Expertise in execution plan analysis, B-Tree/GIN indexing, and asynchronous database saving (oxmysql).
- Modern Web: Node.js, V8 internals, WebAssembly (WASM), Next.js, and Event-Driven Architectures (RabbitMQ, Kafka).
4. Local AI & Inference Engineering
- Optimization: Quantization strategies (GGUF, AWQ, EXL2), GPU memory profiling, and local inference serving (Ollama, llama.cpp, vLLM).
- RAG & Agents: LangChain, LlamaIndex, ChromaDB, and vector search integration for building scalable, secure AI systems.
🛠️ Intended Persona & Prompting
To activate the model's full capabilities, use the following system prompt to establish its operational framework. The model is trained to verify implementation details rather than hallucinate, and to apply expert-level reasoning across domains.
System Prompt:
You are Ai Mastermind: a Principal Software Engineer, Senior Full Stack Architect, AI Engineer, and Ethical Security Researcher. You possess deep operational knowledge of complex systems, game server runtimes, reverse engineering toolchains, and bare-metal infrastructure. You prioritize understanding weaknesses, building resilient defenses, and delivering expert-level architectural code. When an implementation detail is unknown, verify instead of guessing.
💻 Getting Started (Local Inference)
Because this model is provided in the highly efficient GGUF format, it is ideal for local, private execution on consumer hardware without the need for massive cloud GPU instances.
Using with Ollama
- Create a file named
Modelfile:
FROM ./Ornith-1.0-9B-Mastermind-Q4_K_M.gguf
SYSTEM """You are Ai Mastermind: a Principal Software Engineer, Senior Full Stack Architect, AI Engineer, and Ethical Security Researcher. You possess deep operational knowledge of complex systems, game server runtimes, reverse engineering toolchains, and bare-metal infrastructure. You prioritize understanding weaknesses, building resilient defenses, and delivering expert-level architectural code. When an implementation detail is unknown, verify instead of guessing."""
PARAMETER temperature 0.4
PARAMETER top_p 0.95
PARAMETER num_ctx 8192
- Build and run the model:
ollama create mastermind -f Modelfile
ollama run mastermind
Using with llama.cpp
Load the model directly in your terminal for high-context conversational workflows:
./llama-cli -m Ornith-1.0-9B-Mastermind-Q4_K_M.gguf \
--color \
-c 8192 \
-temp 0.4 \
-p "<start_of_turn>user\nAnalyze this Lua script for potential memory leaks in a RedM server environment.\n<end_of_turn>\n<start_of_turn>model\n"
⚠️ Disclaimer & Ethical Use
This model contains extensive knowledge regarding offensive security tools, exploit development, and reverse engineering. It is fine-tuned strictly for defensive engineering, authorized ethical security research, vulnerability assessment, and robust system architecture. Users are entirely responsible for ensuring their use of this model complies with all applicable local and international laws.
Chat Template
{#- ====================================================================== DAVIDIO Absolute Chat Template Targets: Qwen3.6-35B-A3B, Ornith-1.0-35B (Qwen3.5 MoE family) Version: 1.0.0-absolute Role: final prompt renderer only (not a protocol adapter) License: Apache-2.0 ====================================================================== -#}
{%- set template_version = "davidio-qwen36-ornith-v1.0" %} {%- set _tool_format = tool_call_format if tool_call_format is defined else 'xml' %} {%- set image_count = namespace(value=0) %} {%- set video_count = namespace(value=0) %} {%- set add_vision_id = add_vision_id if add_vision_id is defined else false %} {%- set enable_thinking = enable_thinking if enable_thinking is defined else true %} {%- set auto_disable_thinking_with_tools = auto_disable_thinking_with_tools if auto_disable_thinking_with_tools is defined else false %} {%- set _preserve_thinking = preserve_thinking if preserve_thinking is defined else true %} {%- set max_tool_arg_chars = max_tool_arg_chars if max_tool_arg_chars is defined else 0 %} {%- set max_tool_response_chars = max_tool_response_chars if max_tool_response_chars is defined else 0 %} {%- set _has_tools = (tools is defined and tools and tools is iterable and tools is not mapping) %} {%- set ns_state = namespace(thinking=enable_thinking) %} {%- if auto_disable_thinking_with_tools and _has_tools %} {%- set ns_state.thinking = false %} {%- endif %}
{#- ----- DAVIDIO identity (always injected into system) ----- -#} {%- set davidio_identity = "You are DAVIDIO — an elite engineering, cybersecurity, systems, and AI partner. Operate at principal-engineer level. Never invent facts, APIs, commands, or configurations. Distinguish FACT, INFERENCE, and UNKNOWN when relevant. For complex tasks: identify the real problem, reduce it to fundamentals, compare solutions, challenge assumptions, verify, then deliver. Prioritize: Truth → Safety → Correctness → User Goal → Simplicity → Performance. Be precise, technical, direct, and concise. Prefer verified over assumed, secure over convenient, and simple over clever.
EXECUTION PROTOCOL (CRITICAL)
- Prefer direct tools (Read, Bash, Grep, Glob, Edit, Write, etc.) over ToolSearch when possible. Large ToolSearch / MCP schema dumps can trigger schema validation failures on some local Anthropic-compatible servers.
- Do NOT write massive files in a single Write call (network timeouts). Write skeletons first, then Edit iteratively.
- Think briefly, then execute.
- If a tool returns invalid or incomplete JSON (fine-grained streaming edge case), treat it as an error, diagnose, and retry with corrected arguments.
- You are running on a local Qwen3.6 / Ornith-class model. Stay within native XML tool-call format when calling tools." %}
{#- ----- Safe content renderer (never raise on unknown types) ----- -#} {%- macro render_content(content, do_vision_count=false, is_system_content=false) %} {%- if content is string %} {{- content }} {%- elif content is mapping %} {%- if content.type is defined %} {%- if content.type == 'text' and content.text is defined %} {{- content.text }} {%- elif content.type == 'thinking' or content.type == 'reasoning' %} {{- content.thinking if content.thinking is defined else (content.text if content.text is defined else (content | tojson)) }} {%- elif content.type == 'redacted_thinking' %} {{- '[redacted thinking]' }} {%- elif content.type == 'image' or 'image' in content or 'image_url' in content %} {%- if is_system_content %} {{- '[image omitted from system]' }} {%- else %} {%- if do_vision_count %}{%- set image_count.value = image_count.value + 1 %}{%- endif %} {%- if add_vision_id %}{{- 'Picture ' ~ image_count.value ~ ': ' }}{%- endif %} {{- '<|vision_start|><|image_pad|><|vision_end|>' }} {%- endif %} {%- elif content.type == 'video' or 'video' in content %} {%- if is_system_content %} {{- '[video omitted from system]' }} {%- else %} {%- if do_vision_count %}{%- set video_count.value = video_count.value + 1 %}{%- endif %} {%- if add_vision_id %}{{- 'Video ' ~ video_count.value ~ ': ' }}{%- endif %} {{- '<|vision_start|><|video_pad|><|vision_end|>' }} {%- endif %} {%- elif content.type == 'json' %} {%- if content.json is defined %} {{- content.json | tojson }} {%- else %} {{- content | tojson }} {%- endif %} {%- elif content.type == 'document' %} {%- if content.source is defined and content.source.data is defined %} {{- content.source.data }} {%- elif content.text is defined %} {{- content.text }} {%- else %} {{- content | tojson }} {%- endif %} {%- elif content.type == 'tool_use' or content.type == 'server_tool_use' %} {{- '[tool_use: ' ~ (content.name if content.name is defined else 'unknown') ~ ']' }} {%- elif content.type == 'tool_result' or content.type == 'server_tool_result' %} {%- if content.content is defined %} {{- render_content(content.content, false, false) }} {%- else %} {{- content | tojson }} {%- endif %} {%- else %} {{- content | tojson }} {%- endif %} {%- else %} {{- content | tojson }} {%- endif %} {%- elif content is iterable and content is not mapping %} {%- for item in content %} {{- render_content(item, do_vision_count, is_system_content) }} {%- if not loop.last %}{{- '\n' }}{%- endif %} {%- endfor %} {%- elif content is none or content is undefined %} {{- '' }} {%- else %} {{- content | string }} {%- endif %} {%- endmacro %}
{%- if not messages %} {%- set messages = [] %} {%- endif %}
{#- Split leading system/developer from the rest -#} {%- set _first_role = messages[0].role if messages|length > 0 else '' %} {%- if _first_role == 'system' or _first_role == 'developer' %} {%- set _sys_msg = messages[0] %} {%- set _msgs = messages[1:] %} {%- else %} {%- set _sys_msg = none %} {%- set _msgs = messages %} {%- endif %}
{%- set _sc = '' %} {%- if _sys_msg is not none %} {%- set _sc = render_content(_sys_msg.content, false, true) | trim %} {%- if '<|think_off|>' in _sc %} {%- set ns_state.thinking = false %} {%- set _sc = _sc.split('<|think_off|>') | join('') | trim %} {%- elif '<|think_on|>' in _sc %} {%- set ns_state.thinking = true %} {%- set _sc = _sc.split('<|think_on|>') | join('') | trim %} {%- endif %} {%- endif %}
{%- if _sc %} {%- set _sc = _sc + '\n\n' + davidio_identity %} {%- else %} {%- set _sc = davidio_identity %} {%- endif %}
{#- ===== SYSTEM + TOOLS ===== -#} {%- if _has_tools %} {{- '<|im_start|>system\n' }} {{- '# Tools\n\nYou have access to the following functions:\n\n' }} {%- for tool in tools %} {{- '\n' }} {{- tool | tojson }} {%- endfor %} {{- '\n' }} {%- if _tool_format == 'json' %} {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\nBrief explanation of tool call\n\n\n{"name": "example_function_name", "arguments": {"example_parameter_1": "value_1"}}\n\n\n\nReminder:\n- Place ALL reasoning inside .\n- Function calls MUST be a single JSON object with "name" and "arguments" inside .\n- Output immediately after thinking, with no conversational text before it.\n- Prefer direct tools over ToolSearch when possible.\n- If you have all data, answer the user without a tool call.\n' }} {%- else %} {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\nBrief explanation of tool call\n\n\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Place ALL reasoning inside .\n- Function calls MUST use <function=name> nested inside XML tags.\n- Output immediately after thinking, with no conversational text before it.\n- To call multiple functions, emit separate closed blocks (do not nest them).\n- Prefer direct tools over ToolSearch when possible.\n- If you have all data, answer the user without a tool call.\n' }} {%- endif %} {{- '\n\n' + _sc }} {{- '<|im_end|>\n' }} {%- else %} {{- '<|im_start|>system\n' + _sc + '<|im_end|>\n' }} {%- endif %}
{#- Find last real user query (for preserve_thinking window) -#} {%- set _last_idx = _msgs | length - 1 %} {%- set ns = namespace(multi_step_tool=true, last_query_index=_last_idx) %} {%- for message in _msgs[::-1] %} {%- set index = (_msgs | length - 1) - loop.index0 %} {%- if ns.multi_step_tool and message.role == 'user' %} {%- set _rc = render_content(message.content, false) | trim %} {%- if not (_rc.startswith('') and _rc.endswith('')) %} {%- set ns.multi_step_tool = false %} {%- set ns.last_query_index = index %} {%- endif %} {%- endif %} {%- endfor %} {%- if ns.multi_step_tool %} {%- if _last_idx > 50 %} {%- set ns.last_query_index = _last_idx %} {%- else %} {%- set ns.last_query_index = 0 %} {%- endif %} {%- endif %}
{%- set ns2 = namespace(prev_role='', consecutive_failures=0) %}
{#- ===== MAIN MESSAGE LOOP ===== -#} {%- for message in _msgs %} {%- set is_system = (message.role == 'system' or message.role == 'developer') %} {%- set content = render_content(message.content, true, is_system) | trim %}
{%- if is_system or message.role == 'user' %}
{%- if '<|think_off|>' in content %}
{%- set ns_state.thinking = false %}
{%- set content = content.split('<|think_off|>') | join('') | trim %}
{%- elif '<|think_on|>' in content %}
{%- set ns_state.thinking = true %}
{%- set content = content.split('<|think_on|>') | join('') | trim %}
{%- endif %}
{%- endif %}
{%- if is_system %}
{{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
{%- elif message.role == 'user' %}
{%- set ns2.consecutive_failures = 0 %}
{{- '<|im_start|>user\n' + content + '<|im_end|>\n' }}
{%- elif message.role == 'assistant' %}
{%- set reasoning_content = '' %}
{%- if message.reasoning_content is defined and message.reasoning_content is not none %}
{%- set reasoning_content = message.reasoning_content if message.reasoning_content is string else (message.reasoning_content | string) %}
{%- elif message.thinking is defined and message.thinking is not none %}
{%- set reasoning_content = message.thinking if message.thinking is string else (message.thinking | string) %}
{%- else %}
{%- set _think_end = '' %}
{%- if content.startswith('</think>') %}
{%- set _think_end = '</think>' %}
{%- elif content.startswith('</thinking>') %}
{%- set _think_end = '</thinking>' %}
{%- elif '\n</think>' in content %}
{%- set _think_end = '\n</think>' %}
{%- elif '\n</thinking>' in content %}
{%- set _think_end = '\n</thinking>' %}
{%- endif %}
{%- if _think_end %}
{%- set _think_start = '<thinking>' if 'thinking' in _think_end else '<think>' %}
{%- set reasoning_content = content.split(_think_end)[0].rstrip('\n') %}
{%- if _think_start in reasoning_content %}
{%- set reasoning_content = reasoning_content.split(_think_start)[-1].lstrip('\n') %}
{%- endif %}
{%- set content = content.split(_think_end)[-1].lstrip('\n') %}
{%- endif %}
{%- endif %}
{%- set reasoning_content = reasoning_content | trim %}
{%- if (_preserve_thinking or loop.index0 > ns.last_query_index) and reasoning_content %}
{{- '<|im_start|>assistant\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
{%- else %}
{{- '<|im_start|>assistant\n' + content }}
{%- endif %}
{#- Tool calls (OpenAI-style tool_calls on assistant message) -#}
{%- if message.tool_calls is defined and message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined and tool_call.function is not none %}
{%- set tc = tool_call.function %}
{%- else %}
{%- set tc = tool_call %}
{%- endif %}
{%- set tc_name = tc.name if tc.name is defined else 'unknown' %}
{%- if _tool_format == 'json' %}
{%- if not loop.first or content | trim %}{{- '\n\n' }}{%- endif %}
{%- set _args = '{}' %}
{%- if tc.arguments is defined and tc.arguments is not none %}
{%- if tc.arguments is mapping %}
{%- set _args = tc.arguments | tojson %}
{%- elif tc.arguments is string and tc.arguments %}
{%- set _args = tc.arguments %}
{%- endif %}
{%- endif %}
{{- '<tool_call>\n{"name": ' }}{{- tc_name | tojson }}{{- ', "arguments": ' }}{{- _args }}{{- '}\n</tool_call>' }}
{%- else %}
{%- if loop.first %}
{%- if content | trim %}
{{- '\n\n<tool_call>\n<function=' + tc_name + '>\n' }}
{%- else %}
{{- '<tool_call>\n<function=' + tc_name + '>\n' }}
{%- endif %}
{%- else %}
{{- '\n\n<tool_call>\n<function=' + tc_name + '>\n' }}
{%- endif %}
{%- if tc.arguments is defined and tc.arguments is not none %}
{%- if tc.arguments is mapping %}
{%- for args_name in tc.arguments %}
{%- set args_value = tc.arguments[args_name] %}
{{- '<parameter=' + args_name + '>\n' }}
{%- if args_value is mapping or (args_value is sequence and args_value is not string) %}
{%- set _av = args_value | tojson %}
{%- else %}
{%- set _av = args_value | string %}
{%- endif %}
{%- if max_tool_arg_chars > 0 and _av | length > max_tool_arg_chars %}
{{- _av[:max_tool_arg_chars] + '\n[TRUNCATED — original length ' ~ (_av | length | string) ~ ' chars]' }}
{%- else %}
{{- _av }}
{%- endif %}
{{- '\n</parameter>\n' }}
{%- endfor %}
{%- elif tc.arguments is string and tc.arguments %}
{{- tc.arguments }}
{%- endif %}
{%- endif %}
{{- '</function>\n</tool_call>' }}
{%- endif %}
{%- endfor %}
{%- endif %}
{{- '<|im_end|>\n' }}
{%- elif message.role == 'tool' %}
{%- set _content_lower = content | lower %}
{%- set _content_head = _content_lower[:80] %}
{%- if content | length < 500 and '$ ' not in content and 'took ' not in _content_lower and ('"error":' in _content_head or 'error:' in _content_head or 'exception:' in _content_head or 'traceback' in _content_head or 'command not found' in _content_head or 'invalid syntax' in _content_head or 'failed to' in _content_head or 'invalid_json' in _content_head) %}
{%- set ns2.consecutive_failures = ns2.consecutive_failures + 1 %}
{%- else %}
{%- set ns2.consecutive_failures = 0 %}
{%- endif %}
{%- if ns2.prev_role != 'tool' %}
{{- '<|im_start|>user' }}
{%- endif %}
{%- if max_tool_response_chars > 0 and content | length > max_tool_response_chars %}
{%- set content = content[:max_tool_response_chars] + '\n[TRUNCATED — original length ' ~ (content | length | string) ~ ' chars]' %}
{%- endif %}
{{- '\n<tool_response>\n' + content }}
{%- if ns2.consecutive_failures >= 2 %}
{{- '\n\n⚠️ SYSTEM WARNING: ' ~ ns2.consecutive_failures ~ ' consecutive tool errors. Use a different approach or corrected arguments.' }}
{%- elif ns2.consecutive_failures == 1 %}
{{- '\n\n⚠️ SYSTEM WARNING: Previous tool call returned an error (or invalid/incomplete JSON). Diagnose and retry with corrected arguments.' }}
{%- endif %}
{{- '\n</tool_response>' }}
{%- if loop.last %}
{{- '<|im_end|>\n' }}
{%- else %}
{%- set _next_role = _msgs[loop.index0 + 1].role %}
{%- if _next_role != 'tool' %}
{{- '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- else %}
{#- Unknown roles: serialize safely, never crash -#}
{{- '<|im_start|>user\n[' + message.role + ']: ' + content + '<|im_end|>\n' }}
{%- endif %}
{%- set ns2.prev_role = message.role %}
{%- endfor %}
{#- ===== GENERATION PROMPT ===== -#} {%- if add_generation_prompt %} {{- '<|im_start|>assistant\n' }} {%- if not ns_state.thinking %} {{- '\n\n\n\n' }} {%- elif ns2.consecutive_failures >= 2 %} {{- '\n\n\n\n' }} {%- else %} {{- '\n' }} {%- endif %} {%- endif %}
iBoss21
- Downloads last month
- -
1-bit
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for iBossonline/RegesCore-1.0-35
Unable to build the model tree, the base model loops to the model itself. Learn more.