]> git.djapps.eu Git - pkg/ggml/sources/ggml/log
pkg/ggml/sources/ggml
21 months agocuda : suppress compiler warning of unused variables (#505)
Jiahao Li [Fri, 8 Sep 2023 15:01:21 +0000 (23:01 +0800)]
cuda : suppress compiler warning of unused variables (#505)

21 months agocmake : solve prob "clblast.h not found" (#506)
布客飞龙 [Fri, 8 Sep 2023 15:01:02 +0000 (23:01 +0800)]
cmake : solve prob "clblast.h not found" (#506)

21 months agoggml : mark ggml_format_name as a printf-like function (#508)
Cebtenzzre [Fri, 8 Sep 2023 14:58:01 +0000 (10:58 -0400)]
ggml : mark ggml_format_name as a printf-like function (#508)

21 months agoggml : gguf_context const-correctness (#509)
Cebtenzzre [Fri, 8 Sep 2023 14:57:35 +0000 (10:57 -0400)]
ggml : gguf_context const-correctness (#509)

21 months agosync : whisper (POSIX) (#511)
Georgi Gerganov [Fri, 8 Sep 2023 14:57:04 +0000 (17:57 +0300)]
sync : whisper (POSIX) (#511)

* sync : whisper (POSIX)

ggml-ci

* sync : llama (HBM + Metal + style)

ggml-ci

21 months agoFix SAM example mask output with latest ggml
YavorGIvanov [Fri, 8 Sep 2023 13:17:44 +0000 (16:17 +0300)]
Fix SAM example mask output with latest ggml

- I am not sure why this inplace removal causes the output to turn
  correct again. I spend some time debugging and trying different
things, but my assumption is that some dependency is not properly
propagated and the allocator doesn't know about some tensor and
therefore decided to free it and overwrite its memory
- I also added commented out build_forward_expand, which also fixes
the output, but I am still not sure why
- Additionally I am still trying to figure out why the
  ggml_allocr_alloc(..) calls after the ggml_conv_transpose_2d_p0 are
needed
- I guess I have to spend some time debugging the ggml allocator and
  figure out what wrong is happening in this operations. Probably
something wrong in the operation implementation that I am unable to
notice.

Fixes #510.

21 months agocuda : support flattened GLM-style rope to reduce kernel launch (#477)
Jiahao Li [Tue, 5 Sep 2023 18:11:11 +0000 (02:11 +0800)]
cuda : support flattened GLM-style rope to reduce kernel launch (#477)

21 months agowhisper : minor sync
Georgi Gerganov [Tue, 5 Sep 2023 13:37:55 +0000 (16:37 +0300)]
whisper : minor sync

21 months agosam : remove ggml_repeat and use inplace operation (#493)
Yavor Ivanov [Tue, 5 Sep 2023 11:40:17 +0000 (14:40 +0300)]
sam : remove ggml_repeat and use inplace operation (#493)

21 months agoggml : sync llama.cpp (view_src + alloc improvements) (#504)
Georgi Gerganov [Tue, 5 Sep 2023 11:38:30 +0000 (14:38 +0300)]
ggml : sync llama.cpp (view_src + alloc improvements) (#504)

ggml-ci

21 months agowhisper : sync (match OpenAI input, convert, new features) (#495)
Georgi Gerganov [Tue, 5 Sep 2023 10:55:06 +0000 (13:55 +0300)]
whisper : sync (match OpenAI input, convert, new features) (#495)

ggml-ci

22 months agoggml : fix L-BFGS linesearch loop (close #501)
Georgi Gerganov [Sat, 2 Sep 2023 07:07:04 +0000 (10:07 +0300)]
ggml : fix L-BFGS linesearch loop (close #501)

22 months agomnist : update the README (#498)
Radoslav Gerganov [Wed, 30 Aug 2023 11:48:16 +0000 (14:48 +0300)]
mnist : update the README (#498)

22 months agobuild : fix msvc warnings (#496)
Borislav Stanimirov [Tue, 29 Aug 2023 13:36:59 +0000 (16:36 +0300)]
build : fix msvc warnings (#496)

22 months agoCUDA: fix build and enable warnings (#494)
Cebtenzzre [Tue, 29 Aug 2023 12:34:59 +0000 (08:34 -0400)]
CUDA: fix build and enable warnings (#494)

* cmake : fix CUDA build

-Werror=vla needs to be passed to the host compiler.

* cmake : enable warnings for ggml-cuda.cu

* ggml : fix some unused variable warnings

22 months agoMerge pull request #485 from rgerganov/add-mnist-cnn
Radoslav Gerganov [Mon, 28 Aug 2023 21:44:44 +0000 (00:44 +0300)]
Merge pull request #485 from rgerganov/add-mnist-cnn

Add MNIST example with CNN

22 months agoAdd MNIST inference example with CNN
Radoslav Gerganov [Sun, 27 Aug 2023 17:46:51 +0000 (20:46 +0300)]
Add MNIST inference example with CNN

Add one more implementation for MNIST which uses Conv2D layers, ref:
https://keras.io/examples/vision/mnist_convnet/. It achieves ~99%
accuracy on the MNIST test set and also performs better for user inputs.
This implementation expects a model in GGUF format. You can get one with
the 'mnist-cnn.py' script. Example usage:

$ ./mnist-cnn.py train mnist-cnn-model
...
Keras model saved to 'mnist-cnn-model'

$ ./mnist-cnn.py convert mnist-cnn-model
...
Model converted and saved to 'mnist-cnn-model.gguf'

$ ./mnist-cnn mnist-cnn-model.gguf models/mnist/t10k-images.idx3-ubyte

22 months agosam : use ggml-alloc (#490)
Yavor Ivanov [Mon, 28 Aug 2023 12:40:23 +0000 (15:40 +0300)]
sam : use ggml-alloc (#490)

22 months agocmake : enable some basic warnings globally (#482)
Cebtenzzre [Mon, 28 Aug 2023 11:44:18 +0000 (07:44 -0400)]
cmake : enable some basic warnings globally (#482)

* cmake : make -Werror=vla global

* cmake : make -Wuninitialized global (part of -Wall)

* tests : fix some -Wunused warnings

This flag is not enabled by default. There are still some warnings
remaining.

* cmake : make -Wsign-compare global (part of -Wall)

* cmake : make -Wall global (minus -Wunused)

* cmake : make -Wstrict-prototypes global

* cmake : add -Wpedantic -Wformat=2 globally

---------

Co-authored-by: Georgi Gerganov <redacted>
22 months agotests : undefine NDEBUG so the asserts always work (#481)
Cebtenzzre [Mon, 28 Aug 2023 11:36:58 +0000 (07:36 -0400)]
tests : undefine NDEBUG so the asserts always work (#481)

22 months agocmake : fix MSVC build (#479)
Cebtenzzre [Mon, 28 Aug 2023 11:36:16 +0000 (07:36 -0400)]
cmake : fix MSVC build (#479)

* examples : fix use of M_PI on MSVC

* cmake : make -Werror=vla global

* tests : fix CPU feature options on MSVC

* tests : fix __m256 casts on MSVC

22 months agoggml : sync llama.cpp (gguf + metal + ROCm + etc.) (#489)
Georgi Gerganov [Mon, 28 Aug 2023 11:31:13 +0000 (14:31 +0300)]
ggml : sync llama.cpp (gguf + metal + ROCm + etc.) (#489)

* ggml : sync llama.cpp (gguf + metal + ROCm + etc.)

ggml-ci

* cuda : sync rope updates

ggml-ci

22 months agocmake : add WebAssembly check (#487)
Ivan Stepanov [Mon, 28 Aug 2023 09:34:08 +0000 (12:34 +0300)]
cmake : add WebAssembly check (#487)

Ensured that CPU-specific flags are not set when targeting WebAssembly using Emscripten in the CMake script.

22 months agoggml : sync with sam.cpp (add SAM Vit H & L model support and fix SAM's output) ...
Yavor Ivanov [Mon, 28 Aug 2023 08:33:55 +0000 (11:33 +0300)]
ggml : sync with sam.cpp (add SAM Vit H & L model support and fix SAM's output)  (#476)

* Add support for Vit H and Vit L SAM model checkpoints

* Add "eps" argument to ggml_norm and fix all examples

* Fix bias addition for ConvTranspose2D layers in SAM example

* Fix build when GGML_ALLOCATOR_DEBUG is enabled

* Use op params for the stride in CONV_TRANSPOSE_2D

Needed in order for the operation to work with ggml-alloc as
the previous implementation used ggml_new_i32, which uses strach buffers

We should remove new_i32 and new_f32 I think. new_f32 is used in a lot
of places.

22 months agogpt-2 : use ggml-alloc (#486)
slaren [Mon, 28 Aug 2023 08:31:39 +0000 (10:31 +0200)]
gpt-2 : use ggml-alloc (#486)

* gpt-2 : use ggml-alloc

* move function comment to gpt2_eval

* gpt-2 : clarifying comment

---------

Co-authored-by: Georgi Gerganov <redacted>
22 months agoggml : fix instructions for using data pointer
Georgi Gerganov [Fri, 25 Aug 2023 13:56:09 +0000 (16:56 +0300)]
ggml : fix instructions for using data pointer

22 months agocmake : fix MSVC building with CUDA (#424)
Jeffrey Quesnelle [Tue, 22 Aug 2023 10:40:28 +0000 (03:40 -0700)]
cmake : fix MSVC building with CUDA (#424)

22 months agoggml : sync new operators from stable-diffusion.cpp (#461)
leejet [Tue, 22 Aug 2023 10:39:31 +0000 (18:39 +0800)]
ggml : sync new operators from stable-diffusion.cpp (#461)

* ggml : add ggml_group_norm

* ggml : add ggml_upscale

* ggml : add ggml_concat

* ggml : match code style

---------

Co-authored-by: Georgi Gerganov <redacted>
22 months agoMerge pull request #449 from ochafik/python-stubs
Olivier Chafik [Tue, 22 Aug 2023 10:29:00 +0000 (11:29 +0100)]
Merge pull request #449 from ochafik/python-stubs

Add python example w/ cffi-generated bindings

22 months agopython: regenerate bindings + cosmetic cleanups
Olivier Chafik [Tue, 22 Aug 2023 09:52:03 +0000 (10:52 +0100)]
python: regenerate bindings + cosmetic cleanups

22 months agostarcoder : fix starcoder/convert-hf-to-ggml.py to handle current-folder output file...
Brad Ito [Tue, 22 Aug 2023 09:34:07 +0000 (02:34 -0700)]
starcoder : fix starcoder/convert-hf-to-ggml.py to handle current-folder output file - as in README example (#458)

22 months agocuda : add alibi op (#457)
Jiahao Li [Tue, 22 Aug 2023 09:33:27 +0000 (17:33 +0800)]
cuda : add alibi op (#457)

22 months agoggml : rename xPos variables to unify coding style
Georgi Gerganov [Tue, 22 Aug 2023 09:02:00 +0000 (12:02 +0300)]
ggml : rename xPos variables to unify coding style

ggml-ci

22 months agoggml : implementation of xPos RoPE (#441); also extends ggml_rope_back with additiona...
Jan Ploski [Tue, 22 Aug 2023 08:45:20 +0000 (10:45 +0200)]
ggml : implementation of xPos RoPE (#441); also extends ggml_rope_back with additional parameters (breaking API change); does not include CUDA version (#442)

22 months agoggml : sync latest llama.cpp (GGUF) (#470)
Georgi Gerganov [Tue, 22 Aug 2023 08:39:04 +0000 (11:39 +0300)]
ggml : sync latest llama.cpp (GGUF) (#470)

* ggml : sync latest llama.cpp (GGUF)

ggml-ci

* ggml : sync GPU backends

ggml-ci

* ggml : sync ggml-alloc

ggml-ci

* ggml : remove obosolete constant arrays (type traits)

ggml-ci

22 months agoggml : improve ADD_REL_POS perf in SAM by doing it inplace + broadcast BLAS mul_mat...
Yavor Ivanov [Mon, 21 Aug 2023 12:31:27 +0000 (15:31 +0300)]
ggml : improve ADD_REL_POS perf in SAM by doing it inplace + broadcast BLAS mul_mat (#466)

* Improve ADD_REL_POS perf in SAM by doing it inplace

- Add unit tests for the ADD_REL_POS operation
- I am not sure if this is valid implementation as we reuse the src0
  memory in order to avoid copying it
- When running SAM with the "Example output" command, image, point and
  16 threads, this reduces the cumulative time of the ADD_REL_POS operation
  from 1000-1100 ms to 180-200ms
- There is further room for optimization in the access patterns used in
  the implementation of the opration

* Add non-inplace version for the GGML_OP_ADD_REL_POS

* Fix map_unary warnings and refactor LayerNorm2d + remove ggml_cont in it

* Fix Mac printf format warnings

* sam : add ggml_graph_print() comment

* ggml : add broadcast support for BLAS ggml_mul_mat() (#460)

* Remove not needed build_forward_expand from add-rel-pos unit test

---------

Co-authored-by: Georgi Gerganov <redacted>
22 months agoUpdate README to point to SAM example
YavorGIvanov [Fri, 18 Aug 2023 11:59:51 +0000 (14:59 +0300)]
Update README to point to SAM example

22 months agoexamples : add sample SAM inference (#74)
Georgi Gerganov [Fri, 18 Aug 2023 11:50:25 +0000 (14:50 +0300)]
examples : add sample SAM inference (#74)

* sam : image + prompt encoder, store embeddings

* sam : add the dense img pe in SAM state (#401)

* Add SAM decoder & output masks as png (#418)

* Add loading of decoder layers in Model

* Multiply by hypernet_layer_cnt for ctx_size on model load

* Add decoder layers to py conversion script

* Fix wrong and reversed tensor sizes for decoder

* Add decoder transformer implementation

* Add decoder hypernet and iou prediction mlps

* Add transpose convolution operation and unit test

* Finish mask decoder and write the decoder output in the model state

* Output masks to png after removing padding and upsampling to original size

- Also filter based on the iou treshold
- Additionally filtering based on the stability score and crop boxes
should be done

* Add stb image write in order to output masks from SAM

* Add transpose convolution 2d name and symbol to ggml ops static arrays

* Comment out debug print in transpose convolution test to fix compilation

ggml-ci

* Multithread GGML_OP_ADD_REL_POS operation

* ggml : fix GGML_OP_NAME array

* Disable and comment out debug prints in SAM example

* Add README for the SAM example

* Calculate & filter based on stability score and calculate bounding box

ggml-ci

---------

Co-authored-by: Yavor Ivanov <redacted>
22 months agozig : update `build.zig` file to make it work with Zig version 0.11.0 (#450)
Metal Whale [Wed, 16 Aug 2023 19:57:56 +0000 (04:57 +0900)]
zig : update `build.zig` file to make it work with Zig version 0.11.0 (#450)

22 months agoexamples : fix tensor name access (#443)
klosax [Wed, 16 Aug 2023 19:50:49 +0000 (21:50 +0200)]
examples : fix tensor name access (#443)

* fix-examples : wrong tensor name access

* fix-examples : wrong tensor name access

* fix-examples : wrong tensor name access

* fix-examples : wrong tensor name access

* fix-examples : wrong tensor name access

* fix-examples : wrong tensor name access

* fix-examples : wrong tensor name access

22 months agoggml : backport ggml-alloc from llama.cpp (#433)
Sam Spilsbury [Wed, 16 Aug 2023 19:44:18 +0000 (22:44 +0300)]
ggml : backport ggml-alloc from llama.cpp (#433)

* ggml: add graph tensor allocator (#2411)

Backport a113689571420fb4d6540f1a324d12965781356a from llama.cpp

* ggml-alloc: Don't try to re-use buffers of external tensors

They might be weights that came from another context, so we
have no control over them (and they might be re-used elsewhere
so writing to them would be a bad idea).

* ggml-alloc: Fix some compile errors when GGML_ALLOCATOR_DEBUG is on

---------

Co-authored-by: slaren <redacted>
22 months agoAdded some tests to python example + fixed numpy on scalar tensors
ochafik [Mon, 14 Aug 2023 01:17:29 +0000 (02:17 +0100)]
Added some tests to python example + fixed numpy on scalar tensors

22 months agoSimple python stub (*.pyi) generator for cffi
ochafik [Sun, 13 Aug 2023 18:05:57 +0000 (19:05 +0100)]
Simple python stub (*.pyi) generator for cffi

22 months agoAdd python example w/ cffi-generated bindings
ochafik [Sun, 13 Aug 2023 16:37:03 +0000 (17:37 +0100)]
Add python example w/ cffi-generated bindings

Add python example w/ cffi-generated bindings

Features:

- Seamless copies between tensors (ggml & numpy alike) with automatic (de/re)quantization
- Access to full C API (incl. CUDA, MPI, OpenCL, Metal, alloc... and any local API changes)
- Trivial regeneration with `python regenerate.py` (uses llama.cpp headers by default, README.md for options)

22 months agoreadme : add stable-diffusion example (#447)
leejet [Sun, 13 Aug 2023 18:50:48 +0000 (02:50 +0800)]
readme : add stable-diffusion example (#447)

22 months agoggml : mul mat tweaks (#439)
Georgi Gerganov [Mon, 7 Aug 2023 12:11:38 +0000 (15:11 +0300)]
ggml : mul mat tweaks (#439)

ggml-ci

22 months agoggml : pad result of ggml_nbytes()
Georgi Gerganov [Mon, 7 Aug 2023 10:58:02 +0000 (13:58 +0300)]
ggml : pad result of ggml_nbytes()

ggml-ci

22 months agoggml : sync llama.cpp (memory allocator + cuda + metal)
Georgi Gerganov [Mon, 7 Aug 2023 09:09:58 +0000 (12:09 +0300)]
ggml : sync llama.cpp (memory allocator + cuda  + metal)

ggml-ci

22 months agocmake : add avx compile options on Windows (synced from llama.cpp) (#435)
Jiahao Li [Sun, 6 Aug 2023 07:22:25 +0000 (15:22 +0800)]
cmake : add avx compile options on Windows (synced from llama.cpp) (#435)

23 months agocmake : fix msvc cuda build - no need to specify stdlib (#428)
Borislav Stanimirov [Thu, 3 Aug 2023 08:03:49 +0000 (11:03 +0300)]
cmake : fix msvc cuda build - no need to specify stdlib (#428)

23 months agotests : fixed windows build (#426)
Borislav Stanimirov [Thu, 3 Aug 2023 08:03:24 +0000 (11:03 +0300)]
tests : fixed windows build (#426)

23 months agoMerge pull request #422 from ggerganov/ggml-map-custom-new
slaren [Tue, 1 Aug 2023 10:15:46 +0000 (12:15 +0200)]
Merge pull request #422 from ggerganov/ggml-map-custom-new

ggml : add ggml_map_custom1-3

23 months agotest-customop.c : more comments
slaren [Mon, 31 Jul 2023 18:48:52 +0000 (20:48 +0200)]
test-customop.c : more comments

23 months agofix formatting
slaren [Mon, 31 Jul 2023 09:48:44 +0000 (11:48 +0200)]
fix formatting

23 months agoggml : add ggml_map_custom1-3
slaren [Sun, 30 Jul 2023 15:59:51 +0000 (17:59 +0200)]
ggml : add ggml_map_custom1-3

23 months agostarcoder : fix unused variable warnings (#416)
johnson442 [Wed, 26 Jul 2023 05:14:56 +0000 (06:14 +0100)]
starcoder : fix unused variable warnings (#416)

23 months agoggml : sync llama.cpp (#415)
Georgi Gerganov [Tue, 25 Jul 2023 15:28:22 +0000 (18:28 +0300)]
ggml : sync llama.cpp (#415)

- faster graph build
- inference speed-ups across GPU backends
- activation functions relax constraints

ggml-ci

23 months agoreadme : add chatglm example (#414)
klosax [Tue, 25 Jul 2023 15:20:14 +0000 (17:20 +0200)]
readme : add chatglm example (#414)

23 months agotests : remove unnecessary funcs
Georgi Gerganov [Mon, 24 Jul 2023 11:24:53 +0000 (14:24 +0300)]
tests : remove unnecessary funcs

23 months agostarcoder : fix windows build, fix cast warnings (#411)
Borislav Stanimirov [Mon, 24 Jul 2023 10:46:22 +0000 (13:46 +0300)]
starcoder : fix windows build, fix cast warnings (#411)

23 months agocmake : add metal kernel to target resources when built as shared library (#403)
Andrei [Sun, 23 Jul 2023 19:44:54 +0000 (15:44 -0400)]
cmake : add metal kernel to target resources when built as shared library (#403)

* Add GGML_METAL option to compile metal support.

* Add metal option

* Add metal sources

* Add current source directory

* Fix typo

23 months agoggml : refactor unary ops (#405)
Ivan Zdane [Sun, 23 Jul 2023 19:44:13 +0000 (15:44 -0400)]
ggml : refactor unary ops (#405)

* Add gitignore rule for temporary vim files

* ggml: refactor implementation of unary ops

* backends : adapt to ggml_unary_op

* ggml : fix assert number of ops

* ggml : hide ggml_set_unary_op from public API

---------

Co-authored-by: izdane <redacted>
Co-authored-by: Georgi Gerganov <redacted>
23 months agoggml : add coverage measurement for Clang, increase test coverage, F16 ggml_sum ...
goerch [Sun, 23 Jul 2023 16:35:43 +0000 (18:35 +0200)]
ggml : add coverage measurement for Clang, increase test coverage, F16 ggml_sum (#377)

* First shot at adding clang/llvm coverage analysis

* Fix for compiler dependency

* Reducing dimensions in test-opt

* cmake : try to fix test coverage build + CI

* cmake : fix CMAKE option + CI

* Adding some tests for half precision floating point tests

* Adding missing tests for unary operations

* Some more tests for unary operations

* Fix syntax error.

* Fix bug in relu derivative computation

* Revert testing change

* ggml : style fixes

---------

Co-authored-by: Georgi Gerganov <redacted>
23 months agoggml : add get_no_alloc api corresponding to set_no_alloc (#402)
Jiahao Li [Sun, 23 Jul 2023 15:17:06 +0000 (23:17 +0800)]
ggml : add get_no_alloc api corresponding to set_no_alloc (#402)

23 months agoggml : build with -Wmissing-prototypes, fix warnings (#398)
Cebtenzzre [Sun, 23 Jul 2023 15:16:04 +0000 (11:16 -0400)]
ggml : build with -Wmissing-prototypes, fix warnings (#398)

A few function declarations were missing from the API. This warning flag
helps find these problems.

23 months agocommon : fix param parsing (#391)
Reza Rezvan [Sun, 23 Jul 2023 15:12:47 +0000 (17:12 +0200)]
common : fix param parsing (#391)

23 months agoggml : add vector scaling using Accelerate (#380)
taher [Sun, 23 Jul 2023 14:54:27 +0000 (07:54 -0700)]
ggml : add vector scaling using Accelerate (#380)

* Added vector scaling using Accelerate

* added missing elif

23 months agoggml : sync llama.cpp (#409)
Georgi Gerganov [Sun, 23 Jul 2023 14:51:29 +0000 (17:51 +0300)]
ggml : sync llama.cpp (#409)

* ggml : sync llama.cpp

ggml-ci

* ggml : fix nullptr derefs in backward

* ci : add mnist test, import/export graph

* add op_params to ggml_graph_export/import

ggml-ci

* mnist : export/import op_params for testing purposes

* mnist : fix f32 model generation test + instructions

ggml-ci

* ci : install python deps even for low-perf builds

ggml-ci

---------

Co-authored-by: Diego Devesa <redacted>
23 months agoreadme : fix gpt-neox docs (#410)
Tom Bailey [Sun, 23 Jul 2023 14:51:13 +0000 (23:51 +0900)]
readme : fix gpt-neox docs (#410)

* Fix gpt neox example directory reference

* Fix gpt neox bin directory references

23 months agocmake : add PPC64 support (#392)
fitzsim [Sun, 23 Jul 2023 13:46:57 +0000 (09:46 -0400)]
cmake : add PPC64 support (#392)

* cmake : add CMake support for ppc64

* readme : mention ppc64 VSX support

23 months agocmake : sync metal compile scripts from llama.cpp (#407)
Jiahao Li [Sun, 23 Jul 2023 13:43:09 +0000 (21:43 +0800)]
cmake : sync metal compile scripts from llama.cpp (#407)

23 months agoreadme : add minigpt4 link
Georgi Gerganov [Sat, 22 Jul 2023 10:37:55 +0000 (13:37 +0300)]
readme : add minigpt4 link

23 months agoci : avoid hardcoded number of threads
Georgi Gerganov [Sat, 22 Jul 2023 06:23:34 +0000 (09:23 +0300)]
ci : avoid hardcoded number of threads

23 months agoci : update to be able to run locally
Georgi Gerganov [Tue, 18 Jul 2023 11:40:53 +0000 (14:40 +0300)]
ci : update to be able to run locally

23 months agoggml : sync llama.cpp (fix PERF + CUDA dup cont support)
Georgi Gerganov [Tue, 18 Jul 2023 08:10:40 +0000 (11:10 +0300)]
ggml : sync llama.cpp (fix PERF + CUDA dup cont support)

23 months agoci : disable wget progress
Georgi Gerganov [Mon, 17 Jul 2023 14:17:07 +0000 (17:17 +0300)]
ci : disable wget progress

23 months agoci : use models-mnt
Georgi Gerganov [Mon, 17 Jul 2023 13:35:06 +0000 (16:35 +0300)]
ci : use models-mnt

23 months agoci : integrate with ggml-org/ci (#393)
Georgi Gerganov [Sun, 16 Jul 2023 17:55:06 +0000 (20:55 +0300)]
ci : integrate with ggml-org/ci (#393)

* ci : add initial scripts

* ci : remove setup.sh

* run : add deps

* run : fix

* ci : remove deps

* ci : ignore test-opt

* ci : fix ctest

* ci : induce error in ci-1

* ci : try to capture exit codes

* ci : try fix pipefail

* ci : output time of commands

* ci : disable test-opt for release as well

* ci : generate README.md

* ci : update README.md

* ci : fix header

* ci : utilize gg_printf

row 0
row 1 testing adafa

asdfdsa

* ci : move out the README.md header generation

row 0
row 1 dsfkdjs

adslfkaj ska
test

* ci : fix

row 0
row 1 dsfkdjs

adslfkaj ska
test

* ci : induce error

* ci : fix error

remove assert(false)

* ci : fix ctest summary

* ci : fix comment

minor

test test

* ci : fix gg_printf usage

* ci : switch ci-1 to Release

* ci : try to simplify

* ci : induce error

* Revert "ci : induce error"

This reverts commit a9cef1eeb174764a0a1eb5b13753a7637b10f9dd.

* ci : induce error

* ci : fix pipefail + status

* ci : try to fix pipefail

* ci : fix output

* ci : fix return codes

* ci : test

* ci : fix test

* ci : add gpt-2 ci

* ci : fix gpt-2 test

* ci : gpt-2 seed

* ci : fix checks

* ci : time gpt-2

* ci : fix gpt-2 output

* ci : try to fix duplicated output

* ci : try fix duplicated output

* ci : cat gpt-2 output

* ci : finally fix double output

* ci : try to add "set -x"

* ci : fix model var

* ci : append logs

* ci : add mpt

* ci : fix model dir creation

* ci : fix mpt convert

* ci : add mpt config.json

* ci : add configuration_mpt.py

* ci : don't run test-opt on low perf systems

* ci : do not run test-opt in Debug

23 months agoggml : sync llama.cpp (CUDA add/mul bcast + Metal fix + custom RoPE)
Georgi Gerganov [Sat, 15 Jul 2023 11:31:18 +0000 (14:31 +0300)]
ggml : sync llama.cpp (CUDA add/mul bcast + Metal fix + custom RoPE)

23 months agostarcoder : mmap (and gpu) example (#338)
johnson442 [Fri, 14 Jul 2023 17:58:51 +0000 (18:58 +0100)]
starcoder : mmap (and gpu) example (#338)

* Add basic mmap & GPU offload starcoder example

* starcode-mmap : adapt to new ggml API

---------

Co-authored-by: Georgi Gerganov <redacted>
23 months agocuda : fix CUDA arch: OFF -> 52;61 (#389)
Johannes Gäßler [Fri, 14 Jul 2023 17:55:34 +0000 (19:55 +0200)]
cuda : fix CUDA arch: OFF -> 52;61 (#389)

23 months agoggml : sync llama.cpp (fix CUDA build, faster Metal)
Georgi Gerganov [Fri, 14 Jul 2023 13:58:10 +0000 (16:58 +0300)]
ggml : sync llama.cpp (fix CUDA build, faster Metal)

close #379

23 months agocuda : support GLM-style RoPE (#383)
Jiahao Li [Fri, 14 Jul 2023 12:10:59 +0000 (20:10 +0800)]
cuda : support GLM-style RoPE (#383)

23 months agoggml : retire custom ggml_2d impl in favor of general (#352)
Georgi Gerganov [Fri, 14 Jul 2023 12:02:12 +0000 (15:02 +0300)]
ggml : retire custom ggml_2d impl in favor of general (#352)

23 months agoggml : general conv_2d CPU implementation (#352)
David Miller [Fri, 14 Jul 2023 11:38:47 +0000 (04:38 -0700)]
ggml : general conv_2d CPU implementation (#352)

* Conv2d s0 == s1 == 1, d0 == d1 == 1, variable padding

* Mark unused varibles

* Support variable strides

* Handle all non-kernel-width convolutions with same general conv2d

* General 2d Conv

* Remove old function

* Group functions

* Rearrange

* General Conv2d implementation

* Clean up whitespace

23 months agoggml : fix mul_mat src1 indexing when not contiguous and non-F32 (#386)
Georgi Gerganov [Fri, 14 Jul 2023 08:13:55 +0000 (11:13 +0300)]
ggml : fix mul_mat src1 indexing when not contiguous and non-F32 (#386)

23 months agoggml : fix mul_mat src1 indexing when src1 is not contiguous (#386)
Georgi Gerganov [Fri, 14 Jul 2023 08:03:55 +0000 (11:03 +0300)]
ggml : fix mul_mat src1 indexing when src1 is not contiguous (#386)

23 months agoggml : apply mul_mat broadcast fix (sync llama.cpp)
Georgi Gerganov [Wed, 12 Jul 2023 17:52:37 +0000 (20:52 +0300)]
ggml : apply mul_mat broadcast fix (sync llama.cpp)

23 months agocuda : sync llama.cpp
Georgi Gerganov [Wed, 12 Jul 2023 17:38:49 +0000 (20:38 +0300)]
cuda : sync llama.cpp

23 months agoggml : broadcast mul_mat + conv batch support (#325)
M. Yusuf Sarıgöz [Wed, 12 Jul 2023 17:39:14 +0000 (20:39 +0300)]
ggml : broadcast mul_mat + conv batch support (#325)

* ggml : make src0 broadcast-able into src1 for ggml_mul_mat

* WIP: batch inference support for conv_2d

* Impl batch inference support cov_2d

* Correct offset in Conv2D

---------

Co-authored-by: Georgi Gerganov <redacted>
23 months agoggml : pool naming changes + coding style fixes
Georgi Gerganov [Wed, 12 Jul 2023 11:18:20 +0000 (14:18 +0300)]
ggml : pool naming changes + coding style fixes

23 months agoggml : add CUDA gelu op (#374)
Jiahao Li [Wed, 12 Jul 2023 10:52:47 +0000 (18:52 +0800)]
ggml : add CUDA gelu op (#374)

23 months agoggml : basic implementation of 1d and 2d pools (#375)
Borislav Stanimirov [Wed, 12 Jul 2023 10:43:30 +0000 (13:43 +0300)]
ggml : basic implementation of 1d and 2d pools (#375)

pools and tests

no lenet

23 months agoggml : revert CUDA broadcasting changes until fixed
Georgi Gerganov [Wed, 12 Jul 2023 08:39:10 +0000 (11:39 +0300)]
ggml : revert CUDA broadcasting changes until fixed

23 months agoggml : remove unused function (#328)
Georgi Gerganov [Tue, 11 Jul 2023 19:19:42 +0000 (22:19 +0300)]
ggml : remove unused function (#328)

23 months agoggml : fix compile warnings after #328
Georgi Gerganov [Tue, 11 Jul 2023 19:18:48 +0000 (22:18 +0300)]
ggml : fix compile warnings after #328

23 months agoggml : add callback to abort ggml_graph_compute() (#328)
Arjun [Tue, 11 Jul 2023 19:11:45 +0000 (00:41 +0530)]
ggml : add callback to abort ggml_graph_compute() (#328)

* mechanism to abort ggml_graph_compute

* use pthread_cancel

* forgot to commit ggml.h

* static always_false()

Co-authored-by: Georgi Gerganov <redacted>
* accept callback data

* proper function prototype

* return exit status

* remove pthread_cancel and join every thread

* put abort_callback onto cplan

* cplan abort_callback in ggml.c

* make sure all threads abort

---------

Co-authored-by: Georgi Gerganov <redacted>
23 months agoggml : use a single kernel for CUDA mul op (#373)
Jiahao Li [Tue, 11 Jul 2023 18:12:57 +0000 (02:12 +0800)]
ggml : use a single kernel for CUDA mul op (#373)

23 months agotests : ifdef for #pragma GCC (#370)
Borislav Stanimirov [Tue, 11 Jul 2023 18:10:40 +0000 (21:10 +0300)]
tests : ifdef for #pragma GCC (#370)

23 months agoreadme : add link to ggllm.cpp repo (close #361)
Georgi Gerganov [Tue, 11 Jul 2023 18:10:14 +0000 (21:10 +0300)]
readme : add link to ggllm.cpp repo (close #361)