Instructions to use DebateLabKIT/Nemotron-Cascade-14B-Argunaut-2-SFT-LORA-dev2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DebateLabKIT/Nemotron-Cascade-14B-Argunaut-2-SFT-LORA-dev2 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("DebateLabKIT/Nemotron-Cascade-14B-Argunaut-2-SFT-LORA-dev2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add RL training friendly chat template
#1
by ggbetz - opened
15 unmodified lines1617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727310 unmodified lines8485868788897 unmodified lines97989910015 unmodified lines{%- else %}{%- if messages[0].role == 'system' %}{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}{%- else %}{{- '<|im_start|>systemYou are a helpful and harmless assistant.<|im_end|>' }}{%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}{%- for message in messages[::-1] %}{%- set index = (messages|length - 1) - loop.index0 %}{%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}{%- set ns.multi_step_tool = false %}{%- set ns.last_query_index = index %}{%- endif %}{%- endfor %}{%- for message in messages %}{%- if (message.role == "user" and loop.index0 != ns.last_query_index) or (message.role == "system" and not loop.first) %}{{- '<|im_start|>' + message.role + '\n' + message.content + ' /no_think<|im_end|>' + '\n' }}{%- elif message.role == "user" and loop.index0 == ns.last_query_index %}{%- if enable_thinking is defined and enable_thinking is false %}{{- '<|im_start|>' + message.role + '' + message.content + ' /no_think<|im_end|>' + '' }}{%- else %}{{- '<|im_start|>' + message.role + '' + message.content + ' /think<|im_end|>' + '' }}{%- endif %}{%- elif message.role == "assistant" %}{%- set content = message.content %}{%- set reasoning_content = '' %}{%- if message.reasoning_content is defined and message.reasoning_content is not none %}{%- set reasoning_content = message.reasoning_content %}{%- else %}{%- if '</think>' in message.content %}{%- set content = message.content.split('</think>')[-1].lstrip('\n') %}{%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}{%- endif %}{%- endif %}{%- if loop.index0 > ns.last_query_index %}{%- if loop.last or (not loop.last and reasoning_content) %}{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}{%- else %}{{- '<|im_start|>' + message.role + '\n' + content }}{%- endif %}{%- else %}{{- '<|im_start|>' + message.role + '\n' + content }}{%- endif %}{%- if message.tool_calls %}{%- for tool_call in message.tool_calls %}{%- if (loop.first and content) or (not loop.first) %}{{- '\n' }}{%- endif %}{%- if tool_call.function %}{%- set tool_call = tool_call.function %}{%- endif %}10 unmodified lines{%- endif %}{{- '<|im_end|>\n' }}{%- elif message.role == "tool" %}{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}{{- '<|im_start|>user' }}{%- endif %}7 unmodified lines{%- endfor %}{%- if add_generation_prompt %}{{- '<|im_start|>assistant\n' }}{%- endif %}15 unmodified lines161718192021222324252627282930313233343536373839404110 unmodified lines525354555657587 unmodified lines6667686915 unmodified lines{%- else %}{%- if messages[0].role == 'system' %}{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}{%- else %}{{- '<|im_start|>systemYou are a helpful and harmless assistant.<|im_end|>' }}{%- endif %}{%- endif %}{%- for message in messages %}{%- if message.role == "system" %}{# First system message handled above; keep later ones invariant #}{%- if not loop.first %}{{- '<|im_start|>system\n' + message.content + '<|im_end|>\n' }}{%- endif %}{%- elif message.role == "user" %}{{- '<|im_start|>user\n' + message.content + '<|im_end|>\n' }}{%- elif message.role == "assistant" %}{{- '<|im_start|>assistant\n' }}{{- (message.content or '') }}{%- if message.tool_calls %}{%- for tool_call in message.tool_calls %}{{- '\n' }}{%- if tool_call.function %}{%- set tool_call = tool_call.function %}{%- endif %}10 unmodified lines{%- endif %}{{- '<|im_end|>\n' }}{%- elif message.role == "tool" %}{# Group contiguous tool messages into a synthetic user block #}{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}{{- '<|im_start|>user' }}{%- endif %}7 unmodified lines{%- endfor %}{%- if add_generation_prompt %}{{- '<|im_start|>assistant\n' }}{%- endif %}
chat_template.jinja+12-43