Instructions to use unsloth/Jan-nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Inference
- Local Apps
- Unsloth Studio new
How to use unsloth/Jan-nano 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 unsloth/Jan-nano 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 unsloth/Jan-nano to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/Jan-nano to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="unsloth/Jan-nano", max_seq_length=2048, )
Update chat_template.jinja
Browse files- chat_template.jinja +3 -2
chat_template.jinja
CHANGED
|
@@ -36,8 +36,9 @@
|
|
| 36 |
{%- set reasoning_content = message.reasoning_content %}
|
| 37 |
{%- else %}
|
| 38 |
{%- if '</think>' in content %}
|
| 39 |
-
{%- set reasoning_content = content.split('</think>')
|
| 40 |
-
{%- set
|
|
|
|
| 41 |
{%- endif %}
|
| 42 |
{%- endif %}
|
| 43 |
{%- if loop.index0 > ns.last_query_index %}
|
|
|
|
| 36 |
{%- set reasoning_content = message.reasoning_content %}
|
| 37 |
{%- else %}
|
| 38 |
{%- if '</think>' in content %}
|
| 39 |
+
{%- set reasoning_content = (content.split('</think>')|first).rstrip('\n') %}
|
| 40 |
+
{%- set reasoning_content = (reasoning_content.split('<think>')|last).lstrip('\n') %}
|
| 41 |
+
{%- set content = (content.split('</think>')|last).lstrip('\n') %}
|
| 42 |
{%- endif %}
|
| 43 |
{%- endif %}
|
| 44 |
{%- if loop.index0 > ns.last_query_index %}
|