llguidance 1.3.0__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {llguidance-1.3.0 → llguidance-1.5.0}/.github/workflows/rust.yml +33 -2
- {llguidance-1.3.0 → llguidance-1.5.0}/CHANGELOG.md +24 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/Cargo.lock +234 -20
- llguidance-1.3.0/README.md → llguidance-1.5.0/PKG-INFO +22 -3
- llguidance-1.3.0/PKG-INFO → llguidance-1.5.0/README.md +8 -15
- llguidance-1.5.0/docs/toolcalls.md +235 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/json_stats/jstats.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/json_stats/scripts/split-stats.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/json_stats/scripts/split_plot.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/Cargo.toml +6 -1
- llguidance-1.5.0/parser/benches/compute_mask.rs +194 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/grammar.rs +2 -6
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/parser.rs +6 -5
- {llguidance-1.3.0 → llguidance-1.5.0}/pyproject.toml +2 -2
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/_lib.pyi +20 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/gbnf_to_lark.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/mlx.py +1 -1
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/numpy.py +19 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/torch.py +19 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/mypy.ini +1 -1
- {llguidance-1.3.0 → llguidance-1.5.0}/python/torch_tests/test_matcher.py +70 -2
- {llguidance-1.3.0 → llguidance-1.5.0}/python_ext/Cargo.toml +2 -2
- {llguidance-1.3.0 → llguidance-1.5.0}/python_ext/src/llinterpreter.rs +1 -1
- {llguidance-1.3.0 → llguidance-1.5.0}/python_ext/src/llmatcher.rs +65 -17
- {llguidance-1.3.0 → llguidance-1.5.0}/python_ext/src/parserlimits.rs +1 -1
- {llguidance-1.3.0 → llguidance-1.5.0}/python_ext/src/py.rs +5 -5
- {llguidance-1.3.0 → llguidance-1.5.0}/python_ext/src/pyjson.rs +4 -4
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/Cargo.toml +1 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/cli.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/gtest.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/lark.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/run.sh +0 -0
- llguidance-1.5.0/sample_parser/tests/test_json_x_guidance.rs +367 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/bump.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/cbindgen.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/checklinks.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/checklinks.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/ci-publish.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/disasm.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/gbnf_to_lark.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/gen-testcase.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/git-version.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/install-deps.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/remote-guidance-test.sh +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/rust_size.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/test-guidance.sh +1 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/update-git.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/Cargo.toml +1 -1
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/src/svob.rs +32 -1
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/src/toktree.rs +26 -3
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_hf_downloader/Cargo.toml +1 -1
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_hf_tokenizers/Cargo.toml +4 -1
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_hf_tokenizers/src/lib.rs +250 -15
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_tiktoken/Cargo.toml +1 -1
- llguidance-1.3.0/sample_parser/tests/test_json_x_guidance.rs +0 -81
- {llguidance-1.3.0 → llguidance-1.5.0}/.github/workflows/code-coverage.yml +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/.github/workflows/wheels.yml +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/.gitignore +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/CODE_OF_CONDUCT.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/Cargo.toml +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/LICENSE +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/SECURITY.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/SUPPORT.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/c_sample/Makefile +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/c_sample/README.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/c_sample/c_sample.cpp +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/de_recursing.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/fast_forward.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/json_schema.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/mask_plot.png +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/optimizations.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/parametric.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/special_tokens.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/syntax.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/docs/toktrie.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/json_stats/Cargo.toml +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/json_stats/expected_maskbench.json +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/json_stats/src/json_stats.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/json_stats/src/lib.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/json_stats/src/stats.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/LICENSE +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/README.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/build.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/cbindgen.toml +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/grammars/character.json +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/grammars/json.json +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/llguidance.h +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/api.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/constraint.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/from_guidance.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/lexer.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/lexerspec.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/mod.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/perf.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/regexvec.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/earley/slicer.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/factory.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/ffi.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/ffi_par.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/grammar_builder.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/hashcons.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/README.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/compiler.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/context_ref.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/context_simple/context.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/context_simple/draft.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/context_simple/mod.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/formats.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/mod.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/numeric.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/schema.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json/shared_context.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/json_validation.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/lark/README.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/lark/ast.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/lark/common.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/lark/compiler.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/lark/lexer.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/lark/mod.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/lark/parser.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/lib.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/logging.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/matcher.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/output.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/panic_utils.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/regex_rewrite.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/stop_controller.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/substring.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/tokenizer_json.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/parser/src/tokenparser.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/plan.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/__init__.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/_grammar_from.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/_struct_tag.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/_tokenizer.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/_util.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/cli.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/hf.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/llamacpp.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/py.typed +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/llguidance/tiktoken.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/torch_tests/__init__.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/torch_tests/test_bitmask.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/torch_tests/test_hf.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/torch_tests/test_llamacpp.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python/torch_tests/test_tiktoken.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python_ext/src/lib.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/python_ext/src/llamatokenizer.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/README.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/blog.sample.json +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/blog.schema.json +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/blog.schema.ll.json +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/README.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/arithmetic.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/c.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/chess.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/english.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/japanese.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/json.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/json_arr.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/list.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/from-llama.cpp/vllm-sql.gbnf +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/lark.lark +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/rfc.lark +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/rfc.xml +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/data/ulysses.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/src/lib.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/src/minimal.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/src/sample_parser.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/common_lark_utils/mod.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_json_arrays.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_json_enum_const.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_json_objects.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_json_primitives.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_json_schema_combinations.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_json_string_format.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_lark.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_ll.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_raw_parser.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/sample_parser/tests/test_stop.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/annotate_asm.js +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/jsonschema-stats.js +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/rust-size.js +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/scripts/tokenizer_test.py +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/LICENSE +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/README.md +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/src/bytes.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/src/lib.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/src/recognizer.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/src/rng.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/src/tokenv.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie/tests/test_svob.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_hf_downloader/LICENSE +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_hf_downloader/src/lib.rs +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_hf_tokenizers/LICENSE +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_tiktoken/LICENSE +0 -0
- {llguidance-1.3.0 → llguidance-1.5.0}/toktrie_tiktoken/src/lib.rs +0 -0
|
@@ -5,6 +5,16 @@ on:
|
|
|
5
5
|
branches: [ "main" ]
|
|
6
6
|
pull_request:
|
|
7
7
|
branches: [ "main" ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
inputs:
|
|
10
|
+
commit_id:
|
|
11
|
+
description: 'Branch or Commit ID (optional)'
|
|
12
|
+
required: false
|
|
13
|
+
type: string
|
|
14
|
+
schedule:
|
|
15
|
+
# * is a special character in YAML so we quote this string
|
|
16
|
+
# Run at 09:10 UTC every day
|
|
17
|
+
- cron: '10 09 * * *'
|
|
8
18
|
|
|
9
19
|
env:
|
|
10
20
|
CARGO_TERM_COLOR: always
|
|
@@ -15,7 +25,10 @@ jobs:
|
|
|
15
25
|
runs-on: ubuntu-latest
|
|
16
26
|
|
|
17
27
|
steps:
|
|
18
|
-
-
|
|
28
|
+
- name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}
|
|
19
32
|
|
|
20
33
|
- name: Build parser
|
|
21
34
|
run: cargo build --verbose
|
|
@@ -29,24 +42,42 @@ jobs:
|
|
|
29
42
|
- name: Install python test dependencies
|
|
30
43
|
run: ./scripts/install-deps.sh
|
|
31
44
|
|
|
32
|
-
|
|
45
|
+
- name: Disk Space Check
|
|
46
|
+
run: df -h .
|
|
47
|
+
|
|
48
|
+
# The three test steps are equivalent to just ./scripts/test-guidance.sh
|
|
33
49
|
# but we want to run them separately to get better timings/logs/etc
|
|
34
50
|
|
|
35
51
|
- name: Run Rust tests
|
|
36
52
|
run: ./scripts/test-guidance.sh --rust
|
|
37
53
|
|
|
54
|
+
- name: Disk Space Check
|
|
55
|
+
run: df -h .
|
|
56
|
+
|
|
38
57
|
- name: Run MaskBench
|
|
39
58
|
run: ./scripts/test-guidance.sh --mb
|
|
40
59
|
|
|
60
|
+
- name: Disk Space Check
|
|
61
|
+
run: df -h .
|
|
62
|
+
|
|
41
63
|
- name: Run Python Guidance tests
|
|
42
64
|
run: ./scripts/test-guidance.sh --py
|
|
43
65
|
|
|
66
|
+
- name: Disk Space Check
|
|
67
|
+
run: df -h .
|
|
68
|
+
|
|
44
69
|
- name: Build sdist
|
|
45
70
|
run: maturin build --sdist --zig
|
|
46
71
|
|
|
72
|
+
- name: Disk Space Check
|
|
73
|
+
run: df -h .
|
|
74
|
+
|
|
47
75
|
- name: Build wheel
|
|
48
76
|
run: maturin build --zig
|
|
49
77
|
|
|
78
|
+
- name: Disk Space Check
|
|
79
|
+
run: df -h .
|
|
80
|
+
|
|
50
81
|
- name: Upload sdist and wheel artifact
|
|
51
82
|
uses: actions/upload-artifact@v4
|
|
52
83
|
with:
|
|
@@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
If a release doesn't introduce any interesting changes (build fixes etc.), it's skipped.
|
|
6
6
|
|
|
7
|
+
#### [v1.5.0](https://github.com/guidance-ai/llguidance/compare/v1.4.0...v1.5.0) 2026-02-02
|
|
8
|
+
|
|
9
|
+
- [FIX] Coerce `Metaspace` prepend_scheme to `never` [`#272`](https://github.com/guidance-ai/llguidance/pull/272)
|
|
10
|
+
- Speed up toktrie add_bias (~3% improvement) [`#264`](https://github.com/guidance-ai/llguidance/pull/264)
|
|
11
|
+
- Thanks @omarkilani!
|
|
12
|
+
- Add discord & email to readme [`#273`](https://github.com/guidance-ai/llguidance/pull/273)
|
|
13
|
+
- Add parallel token consumption API (consume_token_par) [`#271`](https://github.com/guidance-ai/llguidance/pull/271)
|
|
14
|
+
- Thanks @alecsolder!
|
|
15
|
+
- Add toolcalls doc [`#270`](https://github.com/guidance-ai/llguidance/pull/270)
|
|
16
|
+
- Fix typo in README.md [`#269`](https://github.com/guidance-ai/llguidance/pull/269)
|
|
17
|
+
- Thanks @juliendenize!
|
|
18
|
+
- Mark immutable pyclasses as frozen [`#260`](https://github.com/guidance-ai/llguidance/pull/260)
|
|
19
|
+
- Thanks @ngoldbaum!
|
|
20
|
+
|
|
21
|
+
#### [v1.4.0](https://github.com/guidance-ai/llguidance/compare/v1.3.0...v1.4.0) 2025-11-18
|
|
22
|
+
|
|
23
|
+
- Update pyo3 dependency to latest version to support python 3.14t [`#255`](https://github.com/guidance-ai/llguidance/pull/255)
|
|
24
|
+
- Thank you [@ngoldbaum](https://github.com/ngoldbaum)!
|
|
25
|
+
- Fix tokenization of special tokens for ByteTokenizer [`#249`](https://github.com/guidance-ai/llguidance/pull/249)
|
|
26
|
+
- Thank you [@daulet](https://github.com/daulet)!
|
|
27
|
+
- Bump minimum python version to 3.10 [`#252`](https://github.com/guidance-ai/llguidance/pull/252)
|
|
28
|
+
- Update MSRV in README [`30d1515`](https://github.com/guidance-ai/llguidance/commit/30d15150e2c6bae9e52dea58c72574c160f4697a)
|
|
29
|
+
- Thank you for pointing out the error [@nteodosio](https://github.com/nteodosio)!
|
|
30
|
+
|
|
7
31
|
#### [v1.3.0](https://github.com/guidance-ai/llguidance/compare/v1.2.0...v1.3.0) 2025-10-20
|
|
8
32
|
|
|
9
33
|
- change semantics of JSON separators (now regex patterns instead of text literals) [`#246`](https://github.com/guidance-ai/llguidance/pull/246)
|
|
@@ -40,6 +40,21 @@ dependencies = [
|
|
|
40
40
|
"memchr",
|
|
41
41
|
]
|
|
42
42
|
|
|
43
|
+
[[package]]
|
|
44
|
+
name = "alloca"
|
|
45
|
+
version = "0.4.0"
|
|
46
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
47
|
+
checksum = "e5a7d05ea6aea7e9e64d25b9156ba2fee3fdd659e34e41063cd2fc7cd020d7f4"
|
|
48
|
+
dependencies = [
|
|
49
|
+
"cc",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
[[package]]
|
|
53
|
+
name = "anes"
|
|
54
|
+
version = "0.1.6"
|
|
55
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
56
|
+
checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
|
|
57
|
+
|
|
43
58
|
[[package]]
|
|
44
59
|
name = "anstream"
|
|
45
60
|
version = "0.6.19"
|
|
@@ -229,6 +244,12 @@ version = "1.10.1"
|
|
|
229
244
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
230
245
|
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
|
231
246
|
|
|
247
|
+
[[package]]
|
|
248
|
+
name = "cast"
|
|
249
|
+
version = "0.3.0"
|
|
250
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
251
|
+
checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
|
|
252
|
+
|
|
232
253
|
[[package]]
|
|
233
254
|
name = "castaway"
|
|
234
255
|
version = "0.2.3"
|
|
@@ -253,6 +274,33 @@ version = "1.0.1"
|
|
|
253
274
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
254
275
|
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
|
|
255
276
|
|
|
277
|
+
[[package]]
|
|
278
|
+
name = "ciborium"
|
|
279
|
+
version = "0.2.2"
|
|
280
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
281
|
+
checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e"
|
|
282
|
+
dependencies = [
|
|
283
|
+
"ciborium-io",
|
|
284
|
+
"ciborium-ll",
|
|
285
|
+
"serde",
|
|
286
|
+
]
|
|
287
|
+
|
|
288
|
+
[[package]]
|
|
289
|
+
name = "ciborium-io"
|
|
290
|
+
version = "0.2.2"
|
|
291
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
292
|
+
checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757"
|
|
293
|
+
|
|
294
|
+
[[package]]
|
|
295
|
+
name = "ciborium-ll"
|
|
296
|
+
version = "0.2.2"
|
|
297
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
+
checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9"
|
|
299
|
+
dependencies = [
|
|
300
|
+
"ciborium-io",
|
|
301
|
+
"half",
|
|
302
|
+
]
|
|
303
|
+
|
|
256
304
|
[[package]]
|
|
257
305
|
name = "clap"
|
|
258
306
|
version = "4.5.40"
|
|
@@ -352,6 +400,41 @@ dependencies = [
|
|
|
352
400
|
"cfg-if",
|
|
353
401
|
]
|
|
354
402
|
|
|
403
|
+
[[package]]
|
|
404
|
+
name = "criterion"
|
|
405
|
+
version = "0.8.1"
|
|
406
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
407
|
+
checksum = "4d883447757bb0ee46f233e9dc22eb84d93a9508c9b868687b274fc431d886bf"
|
|
408
|
+
dependencies = [
|
|
409
|
+
"alloca",
|
|
410
|
+
"anes",
|
|
411
|
+
"cast",
|
|
412
|
+
"ciborium",
|
|
413
|
+
"clap",
|
|
414
|
+
"criterion-plot",
|
|
415
|
+
"itertools 0.13.0",
|
|
416
|
+
"num-traits",
|
|
417
|
+
"oorandom",
|
|
418
|
+
"page_size",
|
|
419
|
+
"plotters",
|
|
420
|
+
"rayon",
|
|
421
|
+
"regex",
|
|
422
|
+
"serde",
|
|
423
|
+
"serde_json",
|
|
424
|
+
"tinytemplate",
|
|
425
|
+
"walkdir",
|
|
426
|
+
]
|
|
427
|
+
|
|
428
|
+
[[package]]
|
|
429
|
+
name = "criterion-plot"
|
|
430
|
+
version = "0.8.1"
|
|
431
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
432
|
+
checksum = "ed943f81ea2faa8dcecbbfa50164acf95d555afec96a27871663b300e387b2e4"
|
|
433
|
+
dependencies = [
|
|
434
|
+
"cast",
|
|
435
|
+
"itertools 0.13.0",
|
|
436
|
+
]
|
|
437
|
+
|
|
355
438
|
[[package]]
|
|
356
439
|
name = "crossbeam-deque"
|
|
357
440
|
version = "0.8.6"
|
|
@@ -377,6 +460,12 @@ version = "0.8.21"
|
|
|
377
460
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
378
461
|
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
379
462
|
|
|
463
|
+
[[package]]
|
|
464
|
+
name = "crunchy"
|
|
465
|
+
version = "0.2.4"
|
|
466
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
467
|
+
checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
|
|
468
|
+
|
|
380
469
|
[[package]]
|
|
381
470
|
name = "darling"
|
|
382
471
|
version = "0.20.11"
|
|
@@ -791,6 +880,17 @@ dependencies = [
|
|
|
791
880
|
"tracing",
|
|
792
881
|
]
|
|
793
882
|
|
|
883
|
+
[[package]]
|
|
884
|
+
name = "half"
|
|
885
|
+
version = "2.7.1"
|
|
886
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
887
|
+
checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
|
|
888
|
+
dependencies = [
|
|
889
|
+
"cfg-if",
|
|
890
|
+
"crunchy",
|
|
891
|
+
"zerocopy",
|
|
892
|
+
]
|
|
893
|
+
|
|
794
894
|
[[package]]
|
|
795
895
|
name = "hashbrown"
|
|
796
896
|
version = "0.15.4"
|
|
@@ -1136,6 +1236,15 @@ version = "1.70.1"
|
|
|
1136
1236
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1137
1237
|
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
|
1138
1238
|
|
|
1239
|
+
[[package]]
|
|
1240
|
+
name = "itertools"
|
|
1241
|
+
version = "0.13.0"
|
|
1242
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1243
|
+
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
|
|
1244
|
+
dependencies = [
|
|
1245
|
+
"either",
|
|
1246
|
+
]
|
|
1247
|
+
|
|
1139
1248
|
[[package]]
|
|
1140
1249
|
name = "itertools"
|
|
1141
1250
|
version = "0.14.0"
|
|
@@ -1241,9 +1350,10 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"
|
|
|
1241
1350
|
|
|
1242
1351
|
[[package]]
|
|
1243
1352
|
name = "llguidance"
|
|
1244
|
-
version = "1.
|
|
1353
|
+
version = "1.5.0"
|
|
1245
1354
|
dependencies = [
|
|
1246
1355
|
"anyhow",
|
|
1356
|
+
"criterion",
|
|
1247
1357
|
"derivre",
|
|
1248
1358
|
"indexmap",
|
|
1249
1359
|
"instant",
|
|
@@ -1260,7 +1370,7 @@ dependencies = [
|
|
|
1260
1370
|
|
|
1261
1371
|
[[package]]
|
|
1262
1372
|
name = "llguidance_py"
|
|
1263
|
-
version = "1.
|
|
1373
|
+
version = "1.5.0"
|
|
1264
1374
|
dependencies = [
|
|
1265
1375
|
"anyhow",
|
|
1266
1376
|
"bytemuck",
|
|
@@ -1516,6 +1626,12 @@ version = "1.70.1"
|
|
|
1516
1626
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1517
1627
|
checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
|
|
1518
1628
|
|
|
1629
|
+
[[package]]
|
|
1630
|
+
name = "oorandom"
|
|
1631
|
+
version = "11.1.5"
|
|
1632
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1633
|
+
checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
|
|
1634
|
+
|
|
1519
1635
|
[[package]]
|
|
1520
1636
|
name = "openssl"
|
|
1521
1637
|
version = "0.10.73"
|
|
@@ -1572,6 +1688,16 @@ version = "0.5.2"
|
|
|
1572
1688
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1573
1689
|
checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e"
|
|
1574
1690
|
|
|
1691
|
+
[[package]]
|
|
1692
|
+
name = "page_size"
|
|
1693
|
+
version = "0.6.0"
|
|
1694
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1695
|
+
checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da"
|
|
1696
|
+
dependencies = [
|
|
1697
|
+
"libc",
|
|
1698
|
+
"winapi",
|
|
1699
|
+
]
|
|
1700
|
+
|
|
1575
1701
|
[[package]]
|
|
1576
1702
|
name = "parking_lot"
|
|
1577
1703
|
version = "0.12.4"
|
|
@@ -1625,6 +1751,34 @@ version = "0.3.32"
|
|
|
1625
1751
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1626
1752
|
checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
|
|
1627
1753
|
|
|
1754
|
+
[[package]]
|
|
1755
|
+
name = "plotters"
|
|
1756
|
+
version = "0.3.7"
|
|
1757
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1758
|
+
checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747"
|
|
1759
|
+
dependencies = [
|
|
1760
|
+
"num-traits",
|
|
1761
|
+
"plotters-backend",
|
|
1762
|
+
"plotters-svg",
|
|
1763
|
+
"wasm-bindgen",
|
|
1764
|
+
"web-sys",
|
|
1765
|
+
]
|
|
1766
|
+
|
|
1767
|
+
[[package]]
|
|
1768
|
+
name = "plotters-backend"
|
|
1769
|
+
version = "0.3.7"
|
|
1770
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1771
|
+
checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a"
|
|
1772
|
+
|
|
1773
|
+
[[package]]
|
|
1774
|
+
name = "plotters-svg"
|
|
1775
|
+
version = "0.3.7"
|
|
1776
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1777
|
+
checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670"
|
|
1778
|
+
dependencies = [
|
|
1779
|
+
"plotters-backend",
|
|
1780
|
+
]
|
|
1781
|
+
|
|
1628
1782
|
[[package]]
|
|
1629
1783
|
name = "portable-atomic"
|
|
1630
1784
|
version = "1.11.1"
|
|
@@ -1669,12 +1823,11 @@ dependencies = [
|
|
|
1669
1823
|
|
|
1670
1824
|
[[package]]
|
|
1671
1825
|
name = "pyo3"
|
|
1672
|
-
version = "0.
|
|
1826
|
+
version = "0.27.1"
|
|
1673
1827
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1674
|
-
checksum = "
|
|
1828
|
+
checksum = "37a6df7eab65fc7bee654a421404947e10a0f7085b6951bf2ea395f4659fb0cf"
|
|
1675
1829
|
dependencies = [
|
|
1676
1830
|
"anyhow",
|
|
1677
|
-
"cfg-if",
|
|
1678
1831
|
"indoc",
|
|
1679
1832
|
"libc",
|
|
1680
1833
|
"memoffset",
|
|
@@ -1688,19 +1841,18 @@ dependencies = [
|
|
|
1688
1841
|
|
|
1689
1842
|
[[package]]
|
|
1690
1843
|
name = "pyo3-build-config"
|
|
1691
|
-
version = "0.
|
|
1844
|
+
version = "0.27.1"
|
|
1692
1845
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1693
|
-
checksum = "
|
|
1846
|
+
checksum = "f77d387774f6f6eec64a004eac0ed525aab7fa1966d94b42f743797b3e395afb"
|
|
1694
1847
|
dependencies = [
|
|
1695
|
-
"once_cell",
|
|
1696
1848
|
"target-lexicon",
|
|
1697
1849
|
]
|
|
1698
1850
|
|
|
1699
1851
|
[[package]]
|
|
1700
1852
|
name = "pyo3-ffi"
|
|
1701
|
-
version = "0.
|
|
1853
|
+
version = "0.27.1"
|
|
1702
1854
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1703
|
-
checksum = "
|
|
1855
|
+
checksum = "2dd13844a4242793e02df3e2ec093f540d948299a6a77ea9ce7afd8623f542be"
|
|
1704
1856
|
dependencies = [
|
|
1705
1857
|
"libc",
|
|
1706
1858
|
"pyo3-build-config",
|
|
@@ -1708,9 +1860,9 @@ dependencies = [
|
|
|
1708
1860
|
|
|
1709
1861
|
[[package]]
|
|
1710
1862
|
name = "pyo3-macros"
|
|
1711
|
-
version = "0.
|
|
1863
|
+
version = "0.27.1"
|
|
1712
1864
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1713
|
-
checksum = "
|
|
1865
|
+
checksum = "eaf8f9f1108270b90d3676b8679586385430e5c0bb78bb5f043f95499c821a71"
|
|
1714
1866
|
dependencies = [
|
|
1715
1867
|
"proc-macro2",
|
|
1716
1868
|
"pyo3-macros-backend",
|
|
@@ -1720,9 +1872,9 @@ dependencies = [
|
|
|
1720
1872
|
|
|
1721
1873
|
[[package]]
|
|
1722
1874
|
name = "pyo3-macros-backend"
|
|
1723
|
-
version = "0.
|
|
1875
|
+
version = "0.27.1"
|
|
1724
1876
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1725
|
-
checksum = "
|
|
1877
|
+
checksum = "70a3b2274450ba5288bc9b8c1b69ff569d1d61189d4bff38f8d22e03d17f932b"
|
|
1726
1878
|
dependencies = [
|
|
1727
1879
|
"heck",
|
|
1728
1880
|
"proc-macro2",
|
|
@@ -1792,7 +1944,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1792
1944
|
checksum = "2964d0cf57a3e7a06e8183d14a8b527195c706b7983549cd5462d5aa3747438f"
|
|
1793
1945
|
dependencies = [
|
|
1794
1946
|
"either",
|
|
1795
|
-
"itertools",
|
|
1947
|
+
"itertools 0.14.0",
|
|
1796
1948
|
"rayon",
|
|
1797
1949
|
]
|
|
1798
1950
|
|
|
@@ -2064,6 +2216,15 @@ version = "1.0.20"
|
|
|
2064
2216
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2065
2217
|
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
|
2066
2218
|
|
|
2219
|
+
[[package]]
|
|
2220
|
+
name = "same-file"
|
|
2221
|
+
version = "1.0.6"
|
|
2222
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2223
|
+
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
|
2224
|
+
dependencies = [
|
|
2225
|
+
"winapi-util",
|
|
2226
|
+
]
|
|
2227
|
+
|
|
2067
2228
|
[[package]]
|
|
2068
2229
|
name = "sample_parser"
|
|
2069
2230
|
version = "0.1.0"
|
|
@@ -2074,6 +2235,7 @@ dependencies = [
|
|
|
2074
2235
|
"llguidance",
|
|
2075
2236
|
"rstest",
|
|
2076
2237
|
"serde",
|
|
2238
|
+
"serde-json-fmt",
|
|
2077
2239
|
"serde_json",
|
|
2078
2240
|
"toktrie_hf_downloader",
|
|
2079
2241
|
"toktrie_hf_tokenizers",
|
|
@@ -2132,6 +2294,17 @@ dependencies = [
|
|
|
2132
2294
|
"serde_derive",
|
|
2133
2295
|
]
|
|
2134
2296
|
|
|
2297
|
+
[[package]]
|
|
2298
|
+
name = "serde-json-fmt"
|
|
2299
|
+
version = "0.1.0"
|
|
2300
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2301
|
+
checksum = "a4a33b7a5f52a26d520099339add40c48baf2e5ada194c8cc1b18cafa2b5e419"
|
|
2302
|
+
dependencies = [
|
|
2303
|
+
"serde",
|
|
2304
|
+
"serde_json",
|
|
2305
|
+
"smartstring",
|
|
2306
|
+
]
|
|
2307
|
+
|
|
2135
2308
|
[[package]]
|
|
2136
2309
|
name = "serde_derive"
|
|
2137
2310
|
version = "1.0.219"
|
|
@@ -2186,6 +2359,17 @@ version = "1.15.1"
|
|
|
2186
2359
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2187
2360
|
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
2188
2361
|
|
|
2362
|
+
[[package]]
|
|
2363
|
+
name = "smartstring"
|
|
2364
|
+
version = "1.0.1"
|
|
2365
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2366
|
+
checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29"
|
|
2367
|
+
dependencies = [
|
|
2368
|
+
"autocfg",
|
|
2369
|
+
"static_assertions",
|
|
2370
|
+
"version_check",
|
|
2371
|
+
]
|
|
2372
|
+
|
|
2189
2373
|
[[package]]
|
|
2190
2374
|
name = "socket2"
|
|
2191
2375
|
version = "0.5.10"
|
|
@@ -2381,6 +2565,16 @@ dependencies = [
|
|
|
2381
2565
|
"zerovec",
|
|
2382
2566
|
]
|
|
2383
2567
|
|
|
2568
|
+
[[package]]
|
|
2569
|
+
name = "tinytemplate"
|
|
2570
|
+
version = "1.2.1"
|
|
2571
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2572
|
+
checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
|
|
2573
|
+
dependencies = [
|
|
2574
|
+
"serde",
|
|
2575
|
+
"serde_json",
|
|
2576
|
+
]
|
|
2577
|
+
|
|
2384
2578
|
[[package]]
|
|
2385
2579
|
name = "tokenizers"
|
|
2386
2580
|
version = "0.21.2"
|
|
@@ -2395,7 +2589,7 @@ dependencies = [
|
|
|
2395
2589
|
"esaxx-rs",
|
|
2396
2590
|
"fancy-regex 0.14.0",
|
|
2397
2591
|
"getrandom 0.3.3",
|
|
2398
|
-
"itertools",
|
|
2592
|
+
"itertools 0.14.0",
|
|
2399
2593
|
"log",
|
|
2400
2594
|
"macro_rules_attribute",
|
|
2401
2595
|
"monostate",
|
|
@@ -2478,7 +2672,7 @@ dependencies = [
|
|
|
2478
2672
|
|
|
2479
2673
|
[[package]]
|
|
2480
2674
|
name = "toktrie"
|
|
2481
|
-
version = "1.
|
|
2675
|
+
version = "1.5.0"
|
|
2482
2676
|
dependencies = [
|
|
2483
2677
|
"anyhow",
|
|
2484
2678
|
"bytemuck",
|
|
@@ -2489,7 +2683,7 @@ dependencies = [
|
|
|
2489
2683
|
|
|
2490
2684
|
[[package]]
|
|
2491
2685
|
name = "toktrie_hf_downloader"
|
|
2492
|
-
version = "1.
|
|
2686
|
+
version = "1.5.0"
|
|
2493
2687
|
dependencies = [
|
|
2494
2688
|
"anyhow",
|
|
2495
2689
|
"hf-hub",
|
|
@@ -2500,10 +2694,11 @@ dependencies = [
|
|
|
2500
2694
|
|
|
2501
2695
|
[[package]]
|
|
2502
2696
|
name = "toktrie_hf_tokenizers"
|
|
2503
|
-
version = "1.
|
|
2697
|
+
version = "1.5.0"
|
|
2504
2698
|
dependencies = [
|
|
2505
2699
|
"anyhow",
|
|
2506
2700
|
"log",
|
|
2701
|
+
"rstest",
|
|
2507
2702
|
"serde",
|
|
2508
2703
|
"serde_json",
|
|
2509
2704
|
"tokenizers",
|
|
@@ -2512,7 +2707,7 @@ dependencies = [
|
|
|
2512
2707
|
|
|
2513
2708
|
[[package]]
|
|
2514
2709
|
name = "toktrie_tiktoken"
|
|
2515
|
-
version = "1.
|
|
2710
|
+
version = "1.5.0"
|
|
2516
2711
|
dependencies = [
|
|
2517
2712
|
"anyhow",
|
|
2518
2713
|
"log",
|
|
@@ -2736,6 +2931,16 @@ version = "0.8.0"
|
|
|
2736
2931
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2737
2932
|
checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"
|
|
2738
2933
|
|
|
2934
|
+
[[package]]
|
|
2935
|
+
name = "walkdir"
|
|
2936
|
+
version = "2.5.0"
|
|
2937
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2938
|
+
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
|
2939
|
+
dependencies = [
|
|
2940
|
+
"same-file",
|
|
2941
|
+
"winapi-util",
|
|
2942
|
+
]
|
|
2943
|
+
|
|
2739
2944
|
[[package]]
|
|
2740
2945
|
name = "want"
|
|
2741
2946
|
version = "0.3.1"
|
|
@@ -2898,6 +3103,15 @@ version = "0.4.0"
|
|
|
2898
3103
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2899
3104
|
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
2900
3105
|
|
|
3106
|
+
[[package]]
|
|
3107
|
+
name = "winapi-util"
|
|
3108
|
+
version = "0.1.11"
|
|
3109
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3110
|
+
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
|
3111
|
+
dependencies = [
|
|
3112
|
+
"windows-sys 0.60.2",
|
|
3113
|
+
]
|
|
3114
|
+
|
|
2901
3115
|
[[package]]
|
|
2902
3116
|
name = "winapi-x86_64-pc-windows-gnu"
|
|
2903
3117
|
version = "0.4.0"
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: llguidance
|
|
3
|
+
Version: 1.5.0
|
|
4
|
+
License-File: LICENSE
|
|
5
|
+
Summary: Bindings for the Low-level Guidance (llguidance) Rust library for use within Guidance
|
|
6
|
+
Author: Michal Moskal
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
10
|
+
Project-URL: issue_tracker, https://github.com/microsoft/llguidance/issues
|
|
11
|
+
Project-URL: repository, https://github.com/microsoft/llguidance
|
|
12
|
+
|
|
13
|
+
<div align="right">
|
|
14
|
+
<a href="https://discord.gg/cjPfAK43dz"><img src="https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
|
|
15
|
+
<a href="mailto:guidanceai@microsoft.com"><img src="https://img.shields.io/badge/Email-guidanceai%40microsoft.com-0078D4?logo=microsoft-outlook&logoColor=white" alt="Email"></a>
|
|
16
|
+
<img src="https://img.shields.io/badge/Hours-10am--2pm%20Pacific-gray" alt="Hours">
|
|
17
|
+
</div>
|
|
18
|
+
|
|
1
19
|
# Low-level Guidance (llguidance)
|
|
2
20
|
|
|
3
21
|
<p align="center">
|
|
@@ -23,7 +41,7 @@
|
|
|
23
41
|
## About
|
|
24
42
|
|
|
25
43
|
This library implements constrained decoding (also called constrained sampling or
|
|
26
|
-
structured outputs) for Large
|
|
44
|
+
structured outputs) for Large Language Models (LLMs).
|
|
27
45
|
It can enforce arbitrary context-free grammar on the output of LLM
|
|
28
46
|
and is fast - on the order of 50μs of CPU time per token
|
|
29
47
|
(for 128k tokenizer) with negligible startup costs.
|
|
@@ -99,14 +117,14 @@ Thus, with 16 cores and a 10ms forward pass, llguidance can handle batch sizes u
|
|
|
99
117
|
|
|
100
118
|
## Building
|
|
101
119
|
|
|
102
|
-
- [install rust](https://www.rust-lang.org/tools/install); 1.
|
|
120
|
+
- [install rust](https://www.rust-lang.org/tools/install); 1.87 or later
|
|
103
121
|
|
|
104
122
|
If you just need the C or Rust library (`llguidance`),
|
|
105
123
|
check the [parser](./parser/README.md) directory.
|
|
106
124
|
|
|
107
125
|
For Python bindings:
|
|
108
126
|
|
|
109
|
-
- install python 3.
|
|
127
|
+
- install python 3.10 or later; very likely you'll need a virtual env/conda
|
|
110
128
|
- run `./scripts/install-deps.sh`
|
|
111
129
|
- to build and after any changes, run `./scripts/test-guidance.sh`
|
|
112
130
|
|
|
@@ -134,3 +152,4 @@ trademarks or logos is subject to and must follow
|
|
|
134
152
|
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
|
135
153
|
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
136
154
|
Any use of third-party trademarks or logos are subject to those third-party's policies.
|
|
155
|
+
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Author: Michal Moskal
|
|
7
|
-
License-Expression: MIT
|
|
8
|
-
Requires-Python: >=3.9
|
|
9
|
-
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
10
|
-
Project-URL: repository, https://github.com/microsoft/llguidance
|
|
11
|
-
Project-URL: issue_tracker, https://github.com/microsoft/llguidance/issues
|
|
1
|
+
<div align="right">
|
|
2
|
+
<a href="https://discord.gg/cjPfAK43dz"><img src="https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
|
|
3
|
+
<a href="mailto:guidanceai@microsoft.com"><img src="https://img.shields.io/badge/Email-guidanceai%40microsoft.com-0078D4?logo=microsoft-outlook&logoColor=white" alt="Email"></a>
|
|
4
|
+
<img src="https://img.shields.io/badge/Hours-10am--2pm%20Pacific-gray" alt="Hours">
|
|
5
|
+
</div>
|
|
12
6
|
|
|
13
7
|
# Low-level Guidance (llguidance)
|
|
14
8
|
|
|
@@ -35,7 +29,7 @@ Project-URL: issue_tracker, https://github.com/microsoft/llguidance/issues
|
|
|
35
29
|
## About
|
|
36
30
|
|
|
37
31
|
This library implements constrained decoding (also called constrained sampling or
|
|
38
|
-
structured outputs) for Large
|
|
32
|
+
structured outputs) for Large Language Models (LLMs).
|
|
39
33
|
It can enforce arbitrary context-free grammar on the output of LLM
|
|
40
34
|
and is fast - on the order of 50μs of CPU time per token
|
|
41
35
|
(for 128k tokenizer) with negligible startup costs.
|
|
@@ -111,14 +105,14 @@ Thus, with 16 cores and a 10ms forward pass, llguidance can handle batch sizes u
|
|
|
111
105
|
|
|
112
106
|
## Building
|
|
113
107
|
|
|
114
|
-
- [install rust](https://www.rust-lang.org/tools/install); 1.
|
|
108
|
+
- [install rust](https://www.rust-lang.org/tools/install); 1.87 or later
|
|
115
109
|
|
|
116
110
|
If you just need the C or Rust library (`llguidance`),
|
|
117
111
|
check the [parser](./parser/README.md) directory.
|
|
118
112
|
|
|
119
113
|
For Python bindings:
|
|
120
114
|
|
|
121
|
-
- install python 3.
|
|
115
|
+
- install python 3.10 or later; very likely you'll need a virtual env/conda
|
|
122
116
|
- run `./scripts/install-deps.sh`
|
|
123
117
|
- to build and after any changes, run `./scripts/test-guidance.sh`
|
|
124
118
|
|
|
@@ -146,4 +140,3 @@ trademarks or logos is subject to and must follow
|
|
|
146
140
|
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
|
147
141
|
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
148
142
|
Any use of third-party trademarks or logos are subject to those third-party's policies.
|
|
149
|
-
|