third_party/vllm/ now tracked in git for direct patch management.
Based on vLLM v0.18.1 release with one patch applied:
vllm/v1/core/sched/scheduler.py:
Replace fatal assert with graceful skip when KV transfer callback
arrives for an already-aborted request during PD disaggregated serving.
Future vLLM modifications should be made directly in third_party/vllm/
and committed normally. The patches/ directory is kept as documentation
of what changed from upstream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
676 B
Django/Jinja
17 lines
676 B
Django/Jinja
{%- if messages | length > 1 -%}
|
|
{{ raise_exception('Embedding models should only embed one message at a time') }}
|
|
{%- endif -%}
|
|
|
|
{% set vars = namespace(parts=[], next_image_id=1) %}
|
|
{%- for message in messages -%}
|
|
{%- for content in message['content'] -%}
|
|
{%- if content['type'] == 'text' -%}
|
|
{%- set vars.parts = vars.parts + [content['text']] %}
|
|
{%- elif content['type'] == 'image' -%}
|
|
{%- set vars.parts = vars.parts + ['<|image_{i:d}|>'.format(i=vars.next_image_id)] %}
|
|
{%- set vars.next_image_id = vars.next_image_id + 1 %}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- endfor -%}
|
|
{{ vars.parts | join(' ') }}
|