Skip to content

Conversation

@ochafik
Copy link
Contributor

@ochafik ochafik commented Dec 6, 2024

Almost fixes #7

This adds the following features:

  • array concat w/ +
  • lower filter
  • default filter

Still some issues w/ functions and datetime expected in template (crashes jinja2), which get resolved to None if I add them in the context. Will do a follow up PR.

@ochafik ochafik changed the title Support fireworks-ai/llama-3-firefunction-v2 Improve support for fireworks-ai/llama-3-firefunction-v2 Dec 6, 2024
@ochafik ochafik marked this pull request as ready for review December 6, 2024 22:02
@ochafik ochafik merged commit d6984db into main Dec 6, 2024
5 checks passed
@ochafik ochafik deleted the default-filter branch December 6, 2024 22:02
ochafik referenced this pull request in ochafik/minja Nov 2, 2025
Improve support for fireworks-ai/llama-3-firefunction-v2
CISC pushed a commit to aldehir/minja that referenced this pull request Dec 20, 2025
)

## Summary

Implements support for DeepSeek V3.2's DSML (Domain Specific Markup
Language) format, superseeds google#11 (cc/ @hksdpc255)

DeepSeek V3.2 doesn't provide a Jinja template but uses a custom Python
encoding with DSML format:
```xml
<|DSML|parameter name="key" string="true">value</|DSML|parameter>
```

## Changes

- **Simplified argument needle detection**: Changed from specific
patterns (`"argument_needle":`, `="argument_needle"`) to broader
`"argument_needle"` pattern which matches both JSON keys and DSML
attribute values
- **Local .jinja file support**: Fetch script now handles local `.jinja`
files in MODEL_IDS (for synthetic test templates)
- **Synthetic template**: Added `synthetic-deepseek-v3.2-dsml.jinja`
replicating V3.2's Python encoding logic (from `encoding_dsv32.py`)
- **Integrated testing**: Added synthetic template to MODEL_IDS,
generates 3 test cases (simple, system, tool_use)

## Test plan

- [x] All 248 tests pass
- [x] Capability detection correctly identifies DSML format
(`supports_tool_calls: true`, `requires_object_arguments: true`)
- [x] Synthetic template tests pass for all contexts

Closes google#11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support fireworks-ai/llama-3-firefunction-v2

1 participant