Any-to-Any
MLX
Safetensors
lfm3_omni
liquid
lfm3
lfm3-omni
omni
audio
vision
speech-to-speech
custom_code
Instructions to use LiquidAI/LFM3-Omni-2B-MLX-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use LiquidAI/LFM3-Omni-2B-MLX-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download LiquidAI/LFM3-Omni-2B-MLX-bf16 --local-dir LFM3-Omni-2B-MLX-bf16
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Trim system and user message text in the chat template
Browse filesA newline at the end of a system or user message merged into the token before it, for example `.\n`. The template now applies `| trim` to the system prompt and to user turns.
- chat_template.jinja +2 -2
chat_template.jinja
CHANGED
|
@@ -155,7 +155,7 @@
|
|
| 155 |
{%- set ns = namespace(system_prompt="", last_user_index=-1) -%}
|
| 156 |
{%- if messages and messages[0]["role"] == "system" -%}
|
| 157 |
{%- if messages[0].get("content") -%}
|
| 158 |
-
{%- set ns.system_prompt = parse_content(messages[0]["content"]) -%}
|
| 159 |
{%- endif -%}
|
| 160 |
{%- set messages = messages[1:] -%}
|
| 161 |
{%- endif -%}
|
|
@@ -280,7 +280,7 @@
|
|
| 280 |
{{- "<|im_end|>\n" -}}
|
| 281 |
{%- else %}
|
| 282 |
{%- if message.get("content") -%}
|
| 283 |
-
{{- parse_content(message["content"]) -}}
|
| 284 |
{%- endif -%}
|
| 285 |
{{- "<|im_end|>\n" -}}
|
| 286 |
{%- endif %}
|
|
|
|
| 155 |
{%- set ns = namespace(system_prompt="", last_user_index=-1) -%}
|
| 156 |
{%- if messages and messages[0]["role"] == "system" -%}
|
| 157 |
{%- if messages[0].get("content") -%}
|
| 158 |
+
{%- set ns.system_prompt = parse_content(messages[0]["content"]) | trim -%}
|
| 159 |
{%- endif -%}
|
| 160 |
{%- set messages = messages[1:] -%}
|
| 161 |
{%- endif -%}
|
|
|
|
| 280 |
{{- "<|im_end|>\n" -}}
|
| 281 |
{%- else %}
|
| 282 |
{%- if message.get("content") -%}
|
| 283 |
+
{{- parse_content(message["content"]) | trim -}}
|
| 284 |
{%- endif -%}
|
| 285 |
{{- "<|im_end|>\n" -}}
|
| 286 |
{%- endif %}
|