llama.cpp/examples
Joe Eli McIlvain 66c2c93082
Some checks failed
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full-cuda.Dockerfile platforms:linux/amd64 tag:full-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full-musa.Dockerfile platforms:linux/amd64 tag:full-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full.Dockerfile platforms:linux/amd64,linux/arm64 tag:full]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-cuda.Dockerfile platforms:linux/amd64 tag:light-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-intel.Dockerfile platforms:linux/amd64 tag:light-intel]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-musa.Dockerfile platforms:linux/amd64 tag:light-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli.Dockerfile platforms:linux/amd64,linux/arm64 tag:light]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-cuda.Dockerfile platforms:linux/amd64 tag:server-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-intel.Dockerfile platforms:linux/amd64 tag:server-intel]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-musa.Dockerfile platforms:linux/amd64 tag:server-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server.Dockerfile platforms:linux/amd64,linux/arm64 tag:server]) (push) Waiting to run
Nix CI / nix-eval (macos-latest) (push) Waiting to run
Nix CI / nix-eval (ubuntu-latest) (push) Waiting to run
Nix CI / nix-build (macos-latest) (push) Waiting to run
Nix CI / nix-build (ubuntu-latest) (push) Waiting to run
flake8 Lint / Lint (push) Waiting to run
Python Type-Check / pyright type-check (push) Has been cancelled
grammar : fix JSON Schema for string regex with top-level alt. (#9903)
Prior to this commit, using a JSON Schema containing a string
with `pattern` regular expression that uses top-level alternation
(e.g. `"pattern": "^A|B|C|D$"`) would result in invalid JSON
output from the constrained sampling grammar, because it
ended up creating a grammar rule like this for the string:

```
thing ::= "\"" "A" | "B" | "C" | "D" "\"" space
```

Note that this rule will only match a starting quote for the "A" case,
and will only match an ending quote for the "D" case,
so this rule will always produce invalid JSON when used for sampling
(that is, the JSON will always be lacking the starting quote,
the ending quote, or both).

This was fixed in a simple way by adding parentheses to the
generated rule (for all string pattern rules, to keep it simple),
such that the new generated rule looks like this (correct):

```
thing ::= "\"" ("A" | "B" | "C" | "D") "\"" space
```
2024-10-16 19:03:24 +03:00
..
baby-llama Threadpool: take 2 (#8672) 2024-08-30 01:20:53 +02:00
batched common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
batched-bench common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
batched.swift llama : llama_perf + option to disable timings during decode (#9355) 2024-09-13 09:53:38 +03:00
convert-llama2c-to-ggml common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
cvector-generator common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
deprecation-warning examples : remove finetune and train-text-from-scratch (#8669) 2024-07-25 10:39:04 +02:00
embedding common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
eval-callback common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
export-lora common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
gbnf-validator llama : refactor sampling v2 (#9294) 2024-09-07 15:16:19 +03:00
gen-docs common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
gguf gguf : handle null name during init (#8587) 2024-07-20 17:15:42 +03:00
gguf-hash gguf-hash : update clib.json to point to original xxhash repo (#8491) 2024-07-16 10:14:16 +03:00
gguf-split gguf-split : improve --split and --merge logic (#9619) 2024-10-02 10:21:57 +03:00
gritlm common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
imatrix common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
infill llama : improve infill support and special token detection (#9798) 2024-10-12 08:21:51 +03:00
jeopardy build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
llama-bench rpc : add backend registry / device interfaces (#9812) 2024-10-10 20:14:55 +02:00
llama.android common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
llama.swiftui llama : minor sampling refactor (2) (#9386) 2024-09-09 17:10:46 +02:00
llava common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
lookahead common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
lookup common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
main llama : add infill sampler (#9896) 2024-10-15 16:35:33 +03:00
main-cmake-pkg Removes multiple newlines at the end of files that is breaking the editorconfig step of CI. (#8258) 2024-07-02 12:18:10 -04:00
parallel common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
passkey common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
perplexity common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
quantize quantize : improve type name parsing (#9570) 2024-09-20 20:55:36 +02:00
quantize-stats ggml : fix BLAS with unsupported types (#9775) 2024-10-08 14:21:43 +02:00
retrieval common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
rpc rpc : add backend registry / device interfaces (#9812) 2024-10-10 20:14:55 +02:00
save-load-state common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
server grammar : fix JSON Schema for string regex with top-level alt. (#9903) 2024-10-16 19:03:24 +03:00
simple examples : do not use common library in simple example (#9803) 2024-10-10 19:50:49 +02:00
speculative common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
sycl [SYCL]set context default value to avoid memory issue, update guide (#9476) 2024-09-18 08:30:31 +08:00
tokenize common : use common_ prefix for common library functions (#9805) 2024-10-10 22:57:42 +02:00
base-translate.sh build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
chat-13B.bat Create chat-13B.bat (#592) 2023-03-29 20:21:09 +03:00
chat-13B.sh build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
chat-persistent.sh build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
chat-vicuna.sh build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
chat.sh build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
CMakeLists.txt examples : remove benchmark (#9704) 2024-10-02 10:14:44 +03:00
convert_legacy_llama.py convert-*.py: GGUF Naming Convention Refactor and Metadata Override Refactor (#7499) 2024-07-18 20:40:15 +10:00
json_schema_pydantic_example.py py : type-check all Python scripts with Pyright (#8341) 2024-07-07 15:04:39 -04:00
json_schema_to_grammar.py grammar : fix JSON Schema for string regex with top-level alt. (#9903) 2024-10-16 19:03:24 +03:00
llm.vim llm.vim : stop generation at multiple linebreaks, bind to <F2> (#2879) 2023-08-30 09:50:55 +03:00
Miku.sh build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
pydantic_models_to_grammar_examples.py examples : Rewrite pydantic_models_to_grammar_examples.py (#8493) 2024-07-20 22:09:17 -04:00
pydantic_models_to_grammar.py pydantic : replace uses of __annotations__ with get_type_hints (#8474) 2024-07-14 19:51:21 -04:00
reason-act.sh build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
regex_to_grammar.py py : switch to snake_case (#8305) 2024-07-05 07:53:33 +03:00
server_embd.py py : type-check all Python scripts with Pyright (#8341) 2024-07-07 15:04:39 -04:00
server-llama2-13B.sh build: rename main → llama-cli, server → llama-server, llava-cli → llama-llava-cli, etc... (#7809) 2024-06-13 00:41:52 +01:00
ts-type-to-grammar.sh JSON schema conversion: ️ faster repetitions, min/maxLength for strings, cap number length (#6555) 2024-04-12 19:43:38 +01:00