hermeschen-ezcon commited on
Commit
c7969b4
·
verified ·
1 Parent(s): df1fe62

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. chat_template.jinja +4 -3
README.md CHANGED
@@ -25,7 +25,7 @@ base_model: LiquidAI/LFM2.5-1.2B-Base
25
  ---
26
 
27
  # EZCon/LFM2.5-VL-1.6B-8bit-mlx
28
- This model was converted to MLX format from [`LiquidAI/LFM2.5-VL-1.6B`]() using mlx-vlm version **0.3.11**.
29
  Refer to the [original model card](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B) for more details on the model.
30
  ## Use with mlx
31
 
 
25
  ---
26
 
27
  # EZCon/LFM2.5-VL-1.6B-8bit-mlx
28
+ This model was converted to MLX format from [`LiquidAI/LFM2.5-VL-1.6B`]() using mlx-vlm version **0.3.12**.
29
  Refer to the [original model card](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B) for more details on the model.
30
  ## Use with mlx
31
 
chat_template.jinja CHANGED
@@ -38,10 +38,9 @@
38
  {%- endfor -%}
39
  {%- for message in messages -%}
40
  {{- "<|im_start|>" + message["role"] + "\n" -}}
41
- {%- set content = message["content"] -%}
42
- {%- if content is not string -%}
43
  {%- set ns.content = "" -%}
44
- {%- for item in content -%}
45
  {%- if item["type"] == "image" -%}
46
  {%- set ns.content = ns.content + "<image>" -%}
47
  {%- elif item["type"] == "text" -%}
@@ -51,6 +50,8 @@
51
  {%- endif -%}
52
  {%- endfor -%}
53
  {%- set content = ns.content -%}
 
 
54
  {%- endif -%}
55
  {%- if message["role"] == "assistant" and not keep_past_thinking and loop.index0 != ns.last_assistant_index -%}
56
  {%- if "</think>" in content -%}
 
38
  {%- endfor -%}
39
  {%- for message in messages -%}
40
  {{- "<|im_start|>" + message["role"] + "\n" -}}
41
+ {%- if message["content"] is not string -%}
 
42
  {%- set ns.content = "" -%}
43
+ {%- for item in message["content"] -%}
44
  {%- if item["type"] == "image" -%}
45
  {%- set ns.content = ns.content + "<image>" -%}
46
  {%- elif item["type"] == "text" -%}
 
50
  {%- endif -%}
51
  {%- endfor -%}
52
  {%- set content = ns.content -%}
53
+ {%- else -%}
54
+ {%- set content = message["content"] -%}
55
  {%- endif -%}
56
  {%- if message["role"] == "assistant" and not keep_past_thinking and loop.index0 != ns.last_assistant_index -%}
57
  {%- if "</think>" in content -%}