summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-16gguf : add special tokens metadata for FIM/Infill (#6689)Daniel Bevenius
This commit adds special token metadata for Fill-In-the-Middle (FIM)/Infill to the GGUF model. The motivation for this is that currently there is support for CodeLlama but other models exist now like CodeGemma, but the different models use different token ids for the special tokens and this commit allows for supporting multiple models. Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2024-04-15`main`: add --json-schema / -j flag (#6659)Olivier Chafik
* main: add --json-schema / -j * json: move json-schema-to-grammar to common lib * json: fix zig build
2024-04-15llama : fix restoring the number of outputs from state files (#6687)compilade
2024-04-15server : revert "minor layout improvements" (#6684)Pierrick Hymbert
This reverts commit b3a96f27f065a828f08c5d89ff60aab5361188fe.
2024-04-15swift : linux support (#6590)Steven Prichard
- Package.swift now supports conditional compilation based on OS - Allows for package to be used by SPM on Non-Apple platforms Co-authored-by: Steven Prichard <steven.prichard@justeattakeaway.com>
2024-04-15fix mul_mat_id() for new input, make the ut pass (#6682)Neo Zhang Jianyu
2024-04-14llama : add missing kv clear in llama_beam_search (#6664)David Renshaw
2024-04-14Add Command R chat template (#6650)Chao Jiang
* Add chat template for command-r model series * Fix indentation * Add chat template test for command-r models and update the implementation to trim whitespaces * Remove debug print
2024-04-14flake.lock: Update (#6669)Georgi Gerganov
2024-04-14Added support for GGML_OP_CLAMP in Metal (#6662)Dave
* Added support for GGML_OP_CLAMP in Metal * Corrected size --------- Co-authored-by: dave-fl <dave@Davids-MacBook-Pro.local>
2024-04-14Fix --split-max-size (#6655)Sigbjørn Skjæret
* Fix --split-max-size Byte size calculation was done on int and overflowed. * add tests.sh * add examples test scripts to ci run Will autodiscover examples/*/tests.sh scripts and run them. * move WORK_PATH to a subdirectory * clean up before and after test * explicitly define which scripts to run * add --split-max-size to readme
2024-04-14[bug fix] convert github repository_owner to lowercase (#6673)Jaemin Son
2024-04-14convert : enable the `--use-temp-file` cli flag (#6645)James A Capozzoli
2024-04-14fix memcpy() crash, add missed cmd in guide, fix softmax (#6622)Neo Zhang Jianyu
* disable mmap to fix memcpy crash, add missed cmd in guide, fix softmax * refactor to disable mmap for SYCL backend * fix compile error in other os * refactor the solution, use host buf to fix it, instead of disable mmap * keep to support mmap() * use host buff to reduce malloc times * revert to malloc/free solution, for threaad safe
2024-04-14CUDA: fix matrix multiplication logic for tests (#6667)Johannes Gäßler
2024-04-13model: support arch `DbrxForCausalLM` (#6515)Pierrick Hymbert
* model: dbrx convert to gguf #6344 * llama: support dbrx #6344 * doc: dbrx: add the model as supported * scripts: get-wikitext-2 add unzip * llama: increase maximum experts allowed * llama: factorize moe graph implementation between grok, mixtral and dbrx --------- Co-authored-by: Megha Agarwal <16129366+megha95@users.noreply.github.com>
2024-04-12JSON schema conversion: ⚡️ faster repetitions, min/maxLength for ↵Olivier Chafik
strings, cap number length (#6555) * json: rename python schema converter to make import easier * server: skip null json_schema / grammar fields * json: deps management for primitive rules (+ allow null values) * json: optimize repetitions for minItems/maxItems and regexps: `a{,3}` goes from `"a"? "a"? "a"?` (explosive combos) to `(a (a (a)?)?)?` * grammars: add troubleshooting section to readme * json: cap length of numbers to 15 digits before/after decimal point (avoids infinite gen, e.g. "one third" -> `0.333333333333...`) * json: unify all repetition code (w/ or w/o sep) * json: support string minLength/maxLength * server+json: update server/README w/ result_format * nits * json: fix type error w/ python 3.8 * json: fix server/README (json_schema in /completion vs. result_format in /v1/chat/completions) * json: simplify DOT `{"type": "string", "pattern": "^.$"}` * json: remove recursion in opt_repetitions (avoids Python stack overflow) * json: rm dead code * json: rm useless assert & ggml.h import
2024-04-12metal : unify mul_mv_id kernels (#6556)slaren
2024-04-12infill : add download instructions for model (#6626)Daniel Bevenius
* infill : add download instructions for model This commit adds instructions on how to download a CodeLlama model using the `hf.sh` script. This will download the model and place it in the `models` directory which is the same model use later by the infill example. Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com> * squash! infill : add download instructions for model Clarify the reason for using CodeLlama. Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com> --------- Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2024-04-12server : coherent log output for KV cache full (#6637)Pierrick Hymbert
2024-04-12llama : add gguf_remove_key + remove split meta during quantize (#6591)jiez
* Remove split metadata when quantize model shards * Find metadata key by enum * Correct loop range for gguf_remove_key and code format * Free kv memory --------- Co-authored-by: z5269887 <z5269887@unsw.edu.au>
2024-04-12chore: Fix markdown warnings (#6625)Rene Leonhardt
2024-04-12imatrix : remove invalid assert (#6632)Georgi Gerganov
2024-04-12Correct free memory and total memory. (#6630)MasterYi1024
Co-authored-by: MasterYi <zouxiaoyi@kylinos.cn>
2024-04-12eval-callback: use ggml_op_desc to pretty print unary operator name (#6631)Pierrick Hymbert
2024-04-12ci : disable Metal for macOS-latest-cmake-x64 (#6628)Georgi Gerganov
2024-04-11Optimization: eliminate addition of redundant stacks when advancing grammar. ↵Clint Herron
(#6616)
2024-04-11As suggested by @slaren, disabling Metal for test to fix CI build on OSX ↵Clint Herron
from #6576 (#6619)
2024-04-11Refactor Error Handling for CUDA (#6575)Nikolas
* Refactor Error Handling for CUDA Add guidance for setting CUDA_DOCKER_ARCH to match GPU compute capability for CUDA versions < 11.7. Include link to NVIDIA's CUDA GPUs documentation for compute capability reference. * Update Makefile Improved wording Co-authored-by: Johannes Gäßler <johannesg@5d6.de> --------- Co-authored-by: Johannes Gäßler <johannesg@5d6.de>
2024-04-11grammars: 1.5x faster inference w/ complex grammars (vector reserves / ↵Olivier Chafik
reuses) (#6609) * grammars: reserve rejects & next candidates * grammars: reuse new_stacks * grammars: fix missing sig change in llama.h * grammars: fix test (api changed) * grammars: update gbnf-validator.cpp * grammars: simpler syntax (no swap)
2024-04-11ci: download artifacts to release directory (#6612)Hugo Roussel
When action download-artifact was updated to v4, the default download path changed. This fix binaries not being uploaded to releases.
2024-04-11scripts : add --outdir option to hf.sh (#6600)Daniel Bevenius
* scripts : add --outdir option to hf.sh This commit adds an option to the hf.sh script that allows the user to specify an output directory for the downloaded file. The motivation for this changes is that examples that use the hf.sh script to download models from huggingface can now specify the output directory, perhaps to the `models` directory to keep them in one place and not clutter the root directory. Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com> * squash! scripts : add --outdir option to hf.sh Fix format of the --outdir option in the usage message. Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com> --------- Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2024-04-11eval-callback: Example how to use eval callback for debugging (#6576)Pierrick Hymbert
* gguf-debug: Example how to use ggml callback for debugging * gguf-debug: no mutex, verify type, fix stride. * llama: cv eval: move cb eval field in common gpt_params * ggml_debug: use common gpt_params to pass cb eval. Fix get tensor SIGV random. * ggml_debug: ci: add tests * ggml_debug: EOL in CMakeLists.txt * ggml_debug: Remove unused param n_batch, no batching here * ggml_debug: fix trailing spaces * ggml_debug: fix trailing spaces * common: fix cb_eval and user data not initialized * ci: build revert label * ggml_debug: add main test label * doc: add a model: add a link to ggml-debug * ggml-debug: add to make toolchain * ggml-debug: tests add the main label * ggml-debug: ci add test curl label * common: allow the warmup to be disabled in llama_init_from_gpt_params * ci: add curl test * ggml-debug: better tensor type support * gitignore : ggml-debug * ggml-debug: printing also the sum of each tensor * ggml-debug: remove block size * eval-callback: renamed from ggml-debug * eval-callback: fix make toolchain --------- Co-authored-by: slaren <slarengh@gmail.com> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-04-10gguf : add option to not check tensor data (#6582)Daniel Bevenius
This commit adds an option to the gguf example to not check the tensor data. The motivation for this is that it can be nice to use the gguf tool to read other .gguf files that were not created by the gguf tool. Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2024-04-10minor layout improvements (#6572)Ralph Soika
* minor layout improvements * added missing file, run deps.sh locally
2024-04-10llama : add model types for mixtral (#6589)slaren
2024-04-10convert.py : add consolidated.safetensors for mixtral 8x22b (#6587)slaren
2024-04-10docs : how to add a model (#6565)Pierrick Hymbert
* docs: how to add a model * docs: model: typo and docs * docs: model: add prevision on RoPE * docs: model: rephrasing README.md * docs: model: rephrasing README.md * docs: model: README.md fix trailing spaces * docs : some fixes * Update README.md --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-04-10readme : fix ROCm link (#6579)Artem Zinnatullin
2024-04-10readme : update UI list (#6560)sjxx
2024-04-10readme: fix typo in amdgpu target name (#6573)Jiří Sejkora
2024-04-09BERT tokenizer fixes (#6498)Jared Van Bortel
Key changes: * BERT conversion: fix abuse of LlamaHfVocab, do not set BOS or EOS * Nomic Embed conversion: pad vocab instead of slicing embedding tensor * llama_tokenize: handle added special tokens like HF does
2024-04-09sync : ggmlGeorgi Gerganov
2024-04-09server : detect search query to start webchat (#6554)Ed Lee
2024-04-09llama : add Command R Plus support (#6491)Carolinabanana
* Add Command R Plus GGUF * Add Command R Plus GGUF * Loading works up to LayerNorm2D * Export new tensors in 1D so they are not quantized. * Fix embedding layer based on Noeda's example * Whitespace * Add line * Fix unexpected tokens on MPS. Re-add F16 fix. ((Noeda) * dranger003: Fix block index overflow in CUDA dequantizing. * Reverted blocked multiplication code as it still has issues and could affect other Llama arches * export norms as f32 * fix overflow issues during quant and other cleanup * Type convention Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * dranger003: Fix more int overflow during quant. --------- Co-authored-by: S <seast@Ss-Mac-Studio.local> Co-authored-by: S <s@example.com> Co-authored-by: slaren <slarengh@gmail.com> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-04-09license : update copyright notice + add AUTHORS (#6405)Georgi Gerganov
* license : add AUTHORS * authors : update * scipts : add LICENSE and gen-authors.sh to sync
2024-04-08llama : fix attention layer count sanity check (#6550)Georgi Gerganov
* llama : fix attention layer count sanity check * llama : fix parentheses in attention layer count sanity check There was otherwise a warning when compiling. --------- Co-authored-by: Francis Couture-Harpin <git@compilade.net>
2024-04-08Comment explaining a decision (#6531)kunnis
2024-04-08quantize : fix precedence of cli args (#6541)Georgi Gerganov
2024-04-08llama : support negative ith in llama_get_ API (#6519)Rick G
* llama_sampling_sample with default args is more naively usable * Batches populated by either llama_batch_get_one or llama_batch_add work with default args * Previously get_one could use the default argument * Previously add should usually have used the last index where logits[idx] == true * This hopefully encourages the use of llama_batch_add * By giving expected results when using default arguments. * Adds "negative indexing" feature to llama_get_logits_ith and llama_get_embeddings_ith * Believed to work with any currently well behaved program * Default arg now works for both cases (previously would give strange results for add case) * Any non-negative number is unaffected and behaves as previously * Negative arguments were previously invalid. * Implemented as a special case of indexing as suggested by @compilade in https://github.com/ggerganov/llama.cpp/pull/6519 * Fixed mismatch type errors * cited in macOS CI tests * Missed in original updates based on PR feedback in https://github.com/ggerganov/llama.cpp/pull/6519