Run this model with HF Jobs

Run zai-org/GLM-5.3-Flash-BF16 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/zai-org/GLM-5.3-Flash-BF16. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/zai-org/GLM-5.3-Flash-BF16 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/zai-org/GLM-5.3-Flash-BF16. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/zai-org/GLM-5.3-Flash-BF16. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

chat template: speed up tool-result validation and reordering (GLM-5.3-Flash)

#2

Summary

Syncs the sort-merge tool-result validation and reordering optimization from GLM-5.3-Flash (Discussion #63 port, merged in the FP8 repo) to the BF16 repo. The template is otherwise identical to this repo's current chat_template.jinja.

The existing chat template uses nested loops and repeated macro calls to validate and reorder tool results, which introduces significant rendering overhead for large numbers of parallel tool calls. The updated implementation uses a sort-merge approach, preserving the original ordering and fallback behavior, and avoids Python-specific list.index() calls.

Correctness Validation

Compared this repo's current template against the optimized implementation using randomized conversations and targeted edge cases.

Suite 1 — Jinja2 differential (Python 3.13, Jinja2 3.1.6, ImmutableSandboxedEnvironment with loopcontrols and a Transformers-compatible tojson adapter), run under all four trim_blocks/lstrip_blocks configurations (2,000 cases each): byte-identical outputs / identical error types and messages, 0 behavioral mismatches.

Suite 2 — MiniJinja 2.24.0 differential (Python binding, pycompat=True, HF-compatible tojson): 15,000-case seeded corpus under chainable-undefined semantics — 11,586 byte-identical successes + 3,414 identical-error cases, 0 mismatches.

Suite 3 — NVIDIA Dynamo production renderer: the real Rust dynamo-renderer 8.0.1 (crates.io) with minijinja + minijinja-contrib 2.24.0 — the exact versions in Dynamo main's Cargo.lock (verified via cargo tree) — rendering both templates through the full production path on the identical 15,000-case corpus, 0 mismatches.

ShijinZhang changed pull request status to open
ZHANGYUXUAN-zR changed pull request status to merged

Sign up or log in to comment