summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-20doc : server tests require llama to be built with curl enabled (#6788)Jan Boon
2024-04-20common : try to fix Android CI (#6780)Georgi Gerganov
* common : disable get_math_cpu_count() until Android CI gets fixed * common : another try
2024-04-19ci: add ubuntu latest release and fix missing build number (mac & ubuntu) ↵loonerin
(#6748)
2024-04-19server: static: upstream upgrade (#6765)Pierrick Hymbert
2024-04-19Implement the OLMo architecture (#6741)nopperl
* implement olmo architecture * remove unused variable * remove unused moe branch * remove check for weight * remove superfluous moe, bias and rope tensors * clarified comment * fix clamp_kqv setting * remove obsolete parameter name filter
2024-04-19train : add general name (#6752)Austin
* llama : make general.name optional * train: Add 'general.name' to model metadata Signed-off-by: teleprint-me <77757836+teleprint-me@users.noreply.github.com> --------- Signed-off-by: teleprint-me <77757836+teleprint-me@users.noreply.github.com> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-04-19fix wrong parameter in cmd in readme-sycl.md (#6755)Neo Zhang
Co-authored-by: jianyuzh <jianyu.zhang@intel.com>
2024-04-18ggml : group all experts in a single ggml_mul_mat_id (#6505)slaren
* ggml : group all experts in a single ggml_mul_mat_id cuda : improve mmid row copy * cuda : fix bin bcast with non-cont src0 * test-backend-ops : only run all mul mat tests for base types * llama : disable moe offloading with SYCL --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-04-18convert : support models with multiple chat templates (#6588)Sigbjørn Skjæret
* Support converting models with multiple chat templates Adds the following metadata: * tokenizer.chat_templates * tokenizer.chat_template.<name1> * tokenizer.chat_template.<name2> * tokenizer.chat_template.<...> Where `tokenizer.chat_templates` is an array of the template names (except `default`), `default` is added to the regular `tokenizer.chat_template`. * replace filtered characters with underscore * New script to add/modify/remove metadata This scripts creates a copy of a GGUF file and allows you to add/modify/remove metadata in the process. Most importantly this allows you to update chat templates, either as a string or directly from an updated tokenizer_config.json file. * Add files via upload add new script to project/readme * flake--
2024-04-18Qwen2 : assume tied weights if lm_head/output weights is missing (#6738)Ren Xuancheng
2024-04-18llama : fix compatibility with old 2 expert models (#6735)slaren
2024-04-17llamafile : tmp disable + build sgemm.o when needed (#6716)Georgi Gerganov
* build : sgemm.o only when needed ggml-ci * llamafile : tmp disable due to MoE bug ggml-ci
2024-04-17readme : add UI (#6724)Yaroslav
* Update README.md * Update README.md --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-04-16convert : fix autoawq gemma (#6704)Zheng.Deng
* fix autoawq quantized gemma model convert error using autoawq to quantize gemma model will include a lm_head.weight tensor in model-00001-of-00002.safetensors. it result in this situation that convert-hf-to-gguf.py can't map lm_head.weight. skip loading this tensor could prevent this error. * change code to full string match and print necessary message change code to full string match and print a short message to inform users that lm_head.weight has been skipped. --------- Co-authored-by: Zheng.Deng <32841220+CUGfred@users.noreply.github.com>
2024-04-16llama : make general.name optional (#6709)Georgi Gerganov
2024-04-16ggml : fix llamafile sgemm wdata offsets (#6710)Georgi Gerganov
ggml-ci
2024-04-16ggml : add llamafile sgemm (#6414)Justine Tunney
This change upstreams llamafile's cpu matrix multiplication kernels which improve image and prompt evaluation speed. For starters, Q4_0 and Q8_0 weights should go ~40% faster on CPU. The biggest benefits are with data types like f16 / f32, which process prompts 2x faster thus making them faster than quantized data types for prompt evals. This change also introduces bona fide AVX512 support since tinyBLAS is able to exploit the larger register file. For example, on my CPU llama.cpp llava-cli processes an image prompt at 305 tokens/second, using the Q4_K and Q4_0 types, which has always been faster than if we used f16 LLaVA weights, which at HEAD go 188 tokens/second. With this change, f16 LLaVA performance leap frogs to 464 tokens/second. On Intel Core i9-14900K this change improves F16 prompt perf by 5x. For example, using llama.cpp at HEAD with Mistral 7b f16 to process a 215 token prompt will go 13 tok/sec. This change has fixes making it go 52 tok/sec. It's mostly thanks to my vectorized outer product kernels but also because I added support for correctly counting the number of cores on Alderlake, so the default thread count discounts Intel's new efficiency cores. Only Linux right now can count cores. This work was sponsored by Mozilla who's given permission to change the license of this code from Apache 2.0 to MIT. To read more about what's improved, and how it works, see: https://justine.lol/matmul/
2024-04-16llama : add StableLM2 12B (#6635)Ashish
* StableLM2 12B support for huggingface -> GGUF * StableLM12 tensormapping and constants * StableLM-2-12b model support * fix * Added 12B support * Removed autoformatting; resolved bug where model_arch was not selecting StableLM2 * Formatting * Do QK norm stacking in model conversion step * Converge StableLM and StableLM2 code to simplify graph construction * Fix accidental removal * Removed warnings * Revert formatter * Move QK norm stack to private function so it's easier to read * refactor stablelm graph builder to support 1.6, 3b and 12b more efficiently * Proper check for None type for new_name to avoid crash; formatting; revert change to base class `write_tensors()` * Format * Formatting * format Co-authored-by: compilade <git@compilade.net> * Fix incorrect check for K norm * space after commas; Keep indentation multiple of 4 spaces * Flake8 format * Removed unnecessary conditional branches * Removed unused comment * Fixed incorrect tensor passing * Format --------- Co-authored-by: compilade <git@compilade.net>
2024-04-16llama : add qwen2moe (#6074)Shijie
* support qwen2moe * fix-review * metal : support unary ops for nelements % 4 != 0 * metal : require contiguousness for float4 unary kernels * metal : require contiguousness for float4 unary kernels (cont) * fix-review * names : for brevity "SHARED_EXP" -> "SHEXP" * llama : reuse build_moe_ffn() * llama : add model type name --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-04-16gritlm : add --outdir option to hf.sh script (#6699)Daniel Bevenius
This commit updates the hf.sh script usage to include the --outdir option and specifies the models directory as the output directory. The motivation for this is to avoid cluttering the root directory with model files. Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2024-04-16perplexity : require positive --ctx-size arg (#6695)Georgi Gerganov
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>