Skip to content

v0.2.1

Pre-release
Pre-release

Choose a tag to compare

@binhu02 binhu02 released this 24 Jul 15:58
· 12 commits to main since this release

0.2.1 - 2026-07-24

Release notes

  • Native Hugging Face chat-template support for text instruction models and static-image VLMs.
  • Structured messages, conversations, and conversation batches now work directly with generation, capture, learners, and sweeps.
  • Template-specific inputs, rendering choices, and template hashes are recorded in capture fingerprints and artifact provenance.
  • Safer instruction prompting through assistant-prefix defaults, duplicate special-token protection, and fail-closed validation for unsupported inputs.

Added

  • Hugging Face chat-template generation for structured message mappings,
    conversations, and conversation batches. model.generate(messages=...) is
    supported alongside positional and prompt= inputs.
  • chat_template_kwargs on generation, CaptureRequest, and contrastive
    learners for template-specific inputs such as tools, documents, or an
    explicitly selected template.
  • Processor-preferred chat rendering for image generation, with tokenizer
    fallback, so instruction-style VLM prompts can use their native template.

Changed

  • Chat generation adds an assistant generation prompt by default; capture and
    learner capture retain their explicit default of False.
  • Rendered chat text is tokenized with add_special_tokens=False by default
    to avoid duplicating template-owned BOS/EOS/control tokens. An explicit
    tokenizer or processor option may still override that default.
  • Capture cache keys include template kwargs, while learner artifact provenance
    records the resolved chat-rendering choice. Exact artifact compatibility now
    checks learned tokenizer-template hashes; sweep evaluation recognizes a
    one-message chat mapping as a prompt rather than generation keyword args.

Fixed

  • Single message mappings and raw strings explicitly requesting a template are
    normalized before calling apply_chat_template; mixed raw/chat batches and
    disabled templates for structured messages fail with actionable errors.