Instructions to use RJTPP/scot0500s-magistral-small-2509-24b-REF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RJTPP/scot0500s-magistral-small-2509-24b-REF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("RJTPP/scot0500s-magistral-small-2509-24b-REF", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use RJTPP/scot0500s-magistral-small-2509-24b-REF 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 RJTPP/scot0500s-magistral-small-2509-24b-REF 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 RJTPP/scot0500s-magistral-small-2509-24b-REF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for RJTPP/scot0500s-magistral-small-2509-24b-REF to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="RJTPP/scot0500s-magistral-small-2509-24b-REF", max_seq_length=2048, )
| {#- Copyright 2025-present the Unsloth team. All rights reserved. #} | |
| {#- Licensed under the Apache License, Version 2.0 (the "License") #} | |
| {#- Edits made by Unsloth #} | |
| {%- set default_system_message = 'First draft your thinking process (inner monologue) until you arrive at a response. Format your response using Markdown, and use LaTeX for any mathematical equations. Write both your thoughts and the response in the same language as the input.\n\nYour thinking process must follow the template below:[THINK]Your thoughts or/and draft, like working through an exercise on scratch paper. Be as casual and as long as you want until you are confident to generate the response. Use the same language as the input.[/THINK]Here, provide a self-contained response.' %} | |
| {{- bos_token }} | |
| {%- if messages[0]['role'] == 'system' %} | |
| {%- if messages[0]['content'] is string %} | |
| {%- set system_message = messages[0]['content'] %} | |
| {%- else %} | |
| {%- set system_message = messages[0]['content'][0]['text'] %} | |
| {%- endif %} | |
| {%- set loop_messages = messages[1:] %} | |
| {%- else %} | |
| {%- set system_message = default_system_message %} | |
| {%- set loop_messages = messages %} | |
| {%- endif %} | |
| {{- '[SYSTEM_PROMPT]' + system_message + '[/SYSTEM_PROMPT]' }} | |
| {#- Tool description appended ONLY to last user message. Edits made by Unsloth #} | |
| {#- Tool description appended also if last message is tool. Edits made by Unsloth #} | |
| {%- set tools_description = "" %} | |
| {%- set has_tools = false %} | |
| {%- if tools is defined and tools is not none and tools|length > 0 %} | |
| {%- set has_tools = true %} | |
| {%- set tools_description = "[AVAILABLE_TOOLS]" + (tools | tojson) + "[/AVAILABLE_TOOLS]" %} | |
| {{- tools_description }} | |
| {%- endif %} | |
| {%- for message in loop_messages %} | |
| {%- if message['role'] == 'user' %} | |
| {%- if message['content'] is string %} | |
| {{- '[INST]' + message['content'] + '[/INST]' }} | |
| {%- else %} | |
| {{- '[INST]' }} | |
| {%- for block in message['content'] %} | |
| {%- if block['type'] == 'text' %} | |
| {#- Original did not have content which is weird. Added by Un-sloth. #} | |
| {%- if block['text'] is defined %} | |
| {{- block['text'] }} | |
| {%- else %} | |
| {{- block['content'] }} | |
| {%- endif %} | |
| {%- elif block['type'] in ['image', 'image_url'] %} | |
| {{- '[IMG]' }} | |
| {%- else %} | |
| {{- raise_exception('Only text and image blocks are supported in message content!') }} | |
| {%- endif %} | |
| {%- endfor %} | |
| {{- '[/INST]' }} | |
| {%- endif %} | |
| {%- elif message['role'] == 'system' %} | |
| {%- if message['content'] is string %} | |
| {{- '[SYSTEM_PROMPT]' + message['content'] + '[/SYSTEM_PROMPT]' }} | |
| {%- else %} | |
| {{- '[SYSTEM_PROMPT]' + message['content'][0]['text'] + '[/SYSTEM_PROMPT]' }} | |
| {%- endif %} | |
| {%- elif message['role'] == 'assistant' %} | |
| {%- if message['content'] is string %} | |
| {{- message['content'] }} | |
| {%- elif message['content'] is iterable %} | |
| {{- message['content'][0]['text'] }} | |
| {%- endif %} | |
| {#- If User,Assistant,Tool,Tool we also need to append tools_description. Edits made by Unsloth #} | |
| {%- if message['tool_calls'] is defined and message['tool_calls'] is not none %} | |
| {%- for tool in message['tool_calls'] %} | |
| {%- set arguments = tool['function']['arguments'] %} | |
| {%- if arguments is not string %} | |
| {%- set arguments = arguments|tojson %} | |
| {%- endif %} | |
| {#- Must list tool calls AFTER assistant. Edits made by Un-sloth #} | |
| {{- "[TOOL_CALLS]" + tool['function']['name'] + "[ARGS]" + arguments }} | |
| {%- endfor %} | |
| {%- endif %} | |
| {{- eos_token }} | |
| {%- elif message["role"] == "tool_results" or message["role"] == "tool" %} | |
| {%- if message.content is defined and message.content.content is defined %} | |
| {%- set content = message.content.content %} | |
| {%- else %} | |
| {%- set content = message.content %} | |
| {%- endif %} | |
| {{- "[TOOL_RESULTS]" + content|string + "[/TOOL_RESULTS]" }} | |
| {%- else %} | |
| {{- raise_exception('Only user, system, assistant and tool roles are supported in the custom template made by Unsloth!') }} | |
| {%- endif %} | |
| {%- endfor %} | |
| {#- Copyright 2025-present the Unsloth team. All rights reserved. #} | |
| {#- Licensed under the Apache License, Version 2.0 (the "License") #} |