]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
2 years agoreadme : remove python 3.10 warning (#929)
CRD716 [Thu, 13 Apr 2023 13:59:53 +0000 (08:59 -0500)]
readme : remove python 3.10 warning (#929)

2 years agoreadme : llama node binding (#911)
Genkagaku.GPT [Thu, 13 Apr 2023 13:54:27 +0000 (21:54 +0800)]
readme : llama node binding (#911)

* chore: add nodejs binding

* chore: add nodejs binding

2 years agoflake.nix: add all binaries from bin (#848)
Pavol Rusnak [Thu, 13 Apr 2023 13:49:05 +0000 (15:49 +0200)]
flake.nix: add all binaries from bin (#848)

2 years agozig : update build.zig (#872)
Judd [Thu, 13 Apr 2023 13:43:22 +0000 (21:43 +0800)]
zig : update build.zig (#872)

* update

* update readme

* minimize the changes.

---------

Co-authored-by: zjli2019 <redacted>
2 years agoggml : update cblas_sgemm columns var to be more reasonable (#838)
Vladimir [Thu, 13 Apr 2023 13:24:30 +0000 (15:24 +0200)]
ggml : update cblas_sgemm columns var to be more reasonable (#838)

2 years agoexamples : add -n to alpaca and gpt4all scripts (#706)
niansa/tuxifan [Thu, 13 Apr 2023 13:03:39 +0000 (15:03 +0200)]
examples : add -n to alpaca and gpt4all scripts (#706)

2 years agocmake : add explicit F16C option (x86) (#576)
anzz1 [Thu, 13 Apr 2023 12:48:21 +0000 (15:48 +0300)]
cmake : add explicit F16C option (x86) (#576)

Fixes building for x86 processors missing F16C featureset
MSVC not included, as in MSVC F16C is implied with AVX2/AVX512

2 years agobenchmark : add tool for timing q4_0 matrix multiplication (#653)
SebastianApel [Thu, 13 Apr 2023 12:46:23 +0000 (14:46 +0200)]
benchmark : add tool for timing q4_0 matrix multiplication (#653)

* Initial version of q4_0 matrix multiplication benchmark

* Bugfix: Added dependency to ggml.o to benchmark

* Reviewer requests: added parameter for threads, switched to ggml_time_us()

* Reviewer input: removed rtsc, use epsilon for check

* Review comment: Removed set_locale

* Feature: Param for numer of iterations, Bugfix for use of parameter threads

* Reviewer suggestion: Moved to examples

* Reviewer feedback: Updated clean: and benchmark: sections

---------

Co-authored-by: Georgi Gerganov <redacted>
2 years agodo not force the prompt file to end with a new line (#908)
Pavol Rusnak [Thu, 13 Apr 2023 09:33:16 +0000 (11:33 +0200)]
do not force the prompt file to end with a new line (#908)

2 years agoDon't crash on ftype (formerly f16) == 4 (#917)
Stephan Walter [Wed, 12 Apr 2023 15:06:16 +0000 (15:06 +0000)]
Don't crash on ftype (formerly f16) == 4 (#917)

2 years agoreadme : change "GPU support" link to discussion
Georgi Gerganov [Wed, 12 Apr 2023 11:48:57 +0000 (14:48 +0300)]
readme : change "GPU support" link to discussion

2 years agoreadme : update hot topics with link to "GPU support" issue
Georgi Gerganov [Wed, 12 Apr 2023 11:31:12 +0000 (14:31 +0300)]
readme : update hot topics with link to "GPU support" issue

2 years agoreadme: link to sha256sums file (#902)
Nicolai Weitkemper [Wed, 12 Apr 2023 06:46:20 +0000 (08:46 +0200)]
readme: link to sha256sums file (#902)

This is to emphasize that these do not need to be obtained from elsewhere.

2 years agoFix whitespace, add .editorconfig, add GitHub workflow (#883)
Pavol Rusnak [Tue, 11 Apr 2023 19:45:44 +0000 (21:45 +0200)]
Fix whitespace, add .editorconfig, add GitHub workflow (#883)

2 years agoAdd enum llama_ftype, sync ggml_type to model files (#709)
Stephan Walter [Tue, 11 Apr 2023 15:03:51 +0000 (15:03 +0000)]
Add enum llama_ftype, sync ggml_type to model files (#709)

2 years agoWindows fixes (#890)
comex [Tue, 11 Apr 2023 13:19:54 +0000 (06:19 -0700)]
Windows fixes (#890)

Mostly for msys2 and mingw64 builds, which are different from each other
and different from standard Visual Studio builds.  Isn't Windows fun?

- Define _GNU_SOURCE in more files (it's already used in ggml.c for
  Linux's sake).

- Don't use PrefetchVirtualMemory if not building for Windows 8 or later
  (mingw64 doesn't by default).  But warn the user about this situation
  since it's probably not intended.

- Check for NOMINMAX already being defined, which it is on mingw64.

- Actually use the `increment` variable (bug in my `pizza` PR).

- Suppress unused variable warnings in the fake pthread_create and
  pthread_join implementations for Windows.

- (not Windows-related) Remove mention of `asprintf` from comment;
  `asprintf` is no longer used.

Fixes #871.

2 years agoAdd BAIR's Koala to supported models (#877)
qouoq [Mon, 10 Apr 2023 20:41:53 +0000 (04:41 +0800)]
Add BAIR's Koala to supported models (#877)

2 years agoggml : fix WASM build
Georgi Gerganov [Mon, 10 Apr 2023 20:20:01 +0000 (23:20 +0300)]
ggml : fix WASM build

2 years agoggml : add ggml_cont() + optimize ggml_cpy() for contiguous dst
Georgi Gerganov [Mon, 10 Apr 2023 19:40:28 +0000 (22:40 +0300)]
ggml : add ggml_cont() + optimize ggml_cpy() for contiguous dst

2 years agoggml : remove trailing whitespaces
Georgi Gerganov [Mon, 10 Apr 2023 16:32:45 +0000 (19:32 +0300)]
ggml : remove trailing whitespaces

2 years agoSimplify to include lower-case windows.h always, fix compile on mingw32 (#747)
Marco Matthies [Mon, 10 Apr 2023 17:57:59 +0000 (19:57 +0200)]
Simplify to include lower-case windows.h always, fix compile on mingw32 (#747)

2 years agoggml : fix quantize_row_q4_1() ARM_NEON (close #876)
Georgi Gerganov [Mon, 10 Apr 2023 16:29:48 +0000 (19:29 +0300)]
ggml : fix quantize_row_q4_1() ARM_NEON (close #876)

2 years agoPrint model version.
comex [Sat, 8 Apr 2023 20:08:21 +0000 (13:08 -0700)]
Print model version.

Also improve model type printing, and fix indentation of an unrelated
switch statement.

2 years agoRewrite loading code to try to satisfy everyone:
comex [Sat, 8 Apr 2023 19:24:37 +0000 (12:24 -0700)]
Rewrite loading code to try to satisfy everyone:

- Support all three formats (ggml, ggmf, ggjt).  (However, I didn't
  include the hack needed to support GPT4All files without conversion.
  Those can still be used after converting them with convert.py from my
  other PR.)

- Support both mmap and read (mmap is used by default, but can be
  disabled with `--no-mmap`, and is automatically disabled for pre-ggjt
  files or on platforms where mmap is not supported).

- Support multi-file models like before, but automatically determine the
  number of parts rather than requiring `--n_parts`.

- Improve validation and error checking.

- Stop using the per-file type field (f16) entirely in favor of just
  relying on the per-tensor type/size fields.  This has no immediate
  benefit, but makes it easier to experiment with different formats, and
  should make it easier to support the new GPTQ-for-LLaMa models in the
  future (I have some work in progress on that front).

- Support VirtualLock on Windows (using the same `--mlock` option as on
  Unix).

    - Indicate loading progress when using mmap + mlock.  (Which led me
      to the interesting observation that on my Linux machine, with a
      warm file cache, mlock actually takes some time, whereas mmap
      without mlock starts almost instantly...)

      - To help implement this, move mlock support from ggml to the
        loading code.

- madvise/PrefetchVirtualMemory support (based on #740)

- Switch from ifstream to the `fopen` family of functions to avoid
  unnecessary copying and, when mmap is enabled, allow reusing the same
  file descriptor for both metadata reads and mmap (whereas the existing
  implementation opens the file a second time to mmap).

- Quantization now produces a single-file output even with multi-file
  inputs (not really a feature as much as 'it was easier this way').

Implementation notes:

I tried to factor the code into more discrete pieces than before.

Regarding code style: I tried to follow the code style, but I'm naughty
and used a few advanced C++ features repeatedly:

- Destructors to make it easier to ensure everything gets cleaned up.

- Exceptions.  I don't even usually use exceptions when writing C++, and
  I can remove them if desired... but here they make the loading code
  much more succinct while still properly handling a variety of errors,
  ranging from API calls failing to integer overflow and allocation
  failure.  The exceptions are converted to error codes at the
  API boundary.)

Co-authored-by: Pavol Rusnak <redacted> (for the bit I copied from #740)
2 years agofix for windows utf-8 input (#840)
Tomáš Pazdiora [Sat, 8 Apr 2023 15:49:39 +0000 (17:49 +0200)]
fix for windows utf-8 input (#840)

Use UTF-16 as input on Windows, since UTF-8 does not work and reads multibyte characters as zeros

2 years agocmake should link openblas properly with -lopenblas like how it's done in the makefil...
eiery [Sat, 8 Apr 2023 11:15:17 +0000 (07:15 -0400)]
cmake should link openblas properly with -lopenblas like how it's done in the makefile (#839)

2 years agoAdd new binaries to flake.nix (#847)
lon [Sat, 8 Apr 2023 10:04:23 +0000 (07:04 -0300)]
Add new binaries to flake.nix (#847)

2 years agoAdd quantize-stats command for testing quantization (#728)
unbounded [Fri, 7 Apr 2023 22:09:18 +0000 (00:09 +0200)]
Add quantize-stats command for testing quantization (#728)

Command that calculates some statistics over the errors introduced by
quantization, like mean square error, max error and some percentile errors for layer
weights. Should be useful for testing quantization improvements.

Exposes some internal state from ggml and llama for testing

2 years agomake : add libllama.so target for llama-cpp-python (#797)
bhubbb [Fri, 7 Apr 2023 16:11:58 +0000 (02:11 +1000)]
make : add libllama.so target for llama-cpp-python (#797)

I was able to get llama-cpp-python working but only when I build libllama.so with make.

2 years agozig : don't link examples/common.cpp for non-example (#814)
iacore [Fri, 7 Apr 2023 16:05:29 +0000 (16:05 +0000)]
zig : don't link examples/common.cpp for non-example (#814)

2 years agollama : always sort logits before nucleus sampling (#812)
Ivan Stepanov [Fri, 7 Apr 2023 16:02:12 +0000 (19:02 +0300)]
llama : always sort logits before nucleus sampling (#812)

* Always sort logits before nucleus sampling

* remove second normalization

- fix windows build
- remove normalization since std::discrete_distribution does not require it

2 years agoDo not crash when it has nothing to say. (#796)
Sergey Alirzaev [Thu, 6 Apr 2023 15:59:11 +0000 (17:59 +0200)]
Do not crash when it has nothing to say. (#796)

Otherwise observing this in the interactive mode:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_vector.h:1230: reference std::vector<int>::back() [_Tp = int, _Alloc = std::allocator<int>]: Assertion '!this->empty()' failed.

2 years agoMake docker instructions more explicit (#785)
Pavol Rusnak [Thu, 6 Apr 2023 06:56:58 +0000 (08:56 +0200)]
Make docker instructions more explicit (#785)

2 years agoggml : multi-thread ggml_rope() (~3-4 times faster on M1) (#781)
Georgi Gerganov [Wed, 5 Apr 2023 19:11:03 +0000 (22:11 +0300)]
ggml : multi-thread ggml_rope() (~3-4 times faster on M1) (#781)

2 years agoggml, llama : avoid heavy V transpose + improvements (#775)
Georgi Gerganov [Wed, 5 Apr 2023 19:07:33 +0000 (22:07 +0300)]
ggml, llama : avoid heavy V transpose + improvements (#775)

ggml :

- added ggml_view_3d()
- ggml_view_tensor() now inherits the stride too
- reimplement ggml_cpy() to account for dst stride
- no longer require tensor->data to be memory aligned

llama :

- compute RoPE on 32-bit tensors (should be more accurate)
- store RoPE-ed K in the KV cache
- store transposed V in the KV cache (significant speed-up)
- avoid unnecessary Q copy

2 years agoUpdate README.md
Georgi Gerganov [Wed, 5 Apr 2023 16:54:30 +0000 (19:54 +0300)]
Update README.md

2 years agollama : define non-positive top_k; top_k range check (#779)
Ivan Stepanov [Wed, 5 Apr 2023 16:20:05 +0000 (19:20 +0300)]
llama : define non-positive top_k; top_k range check (#779)

* Define non-positive top_k; top_k range check

* minor : brackets

---------

Co-authored-by: Georgi Gerganov <redacted>
2 years agomiku.sh : add executable bit (#780)
at8u [Wed, 5 Apr 2023 15:59:13 +0000 (15:59 +0000)]
miku.sh : add executable bit (#780)

2 years agomedia : add logos and banners
Georgi Gerganov [Wed, 5 Apr 2023 15:58:06 +0000 (18:58 +0300)]
media : add logos and banners

2 years agoreadme : change logo + add bindings + add uis + add wiki
Georgi Gerganov [Wed, 5 Apr 2023 15:56:20 +0000 (18:56 +0300)]
readme : change logo + add bindings + add uis + add wiki

2 years agozig : add build.zig (#773)
iacore [Wed, 5 Apr 2023 15:06:02 +0000 (15:06 +0000)]
zig : add build.zig (#773)

Co-authored-by: Locria Cyber <redacted>
2 years agomake : missing host optimizations in CXXFLAGS (#763)
Ivan Stepanov [Wed, 5 Apr 2023 14:38:37 +0000 (17:38 +0300)]
make : missing host optimizations in CXXFLAGS (#763)

2 years agoreadme : update with CMake and windows example (#748)
Adithya Balaji [Wed, 5 Apr 2023 14:36:12 +0000 (16:36 +0200)]
readme : update with CMake and windows example (#748)

* README: Update with CMake and windows example

* README: update with code-review for cmake build

2 years agoexamples : add Miku.sh (#724)
at8u [Wed, 5 Apr 2023 14:32:42 +0000 (14:32 +0000)]
examples : add Miku.sh (#724)

* Add Miku.sh to examples

* Add missing line to prompt in Miku.sh

* Add --keep param to Miku.sh

* Remove '[end_of_conversation]' line from Miku.sh

No longer is necessary.

2 years agoAdd Accelerate/BLAS when using Swift (#765)
Andrew Duffy [Wed, 5 Apr 2023 10:44:24 +0000 (11:44 +0100)]
Add Accelerate/BLAS when using Swift (#765)

2 years agoWindows: reactive sigint handler after each Ctrl-C (#736)
mgroeber9110 [Mon, 3 Apr 2023 16:00:55 +0000 (18:00 +0200)]
Windows: reactive sigint handler after each Ctrl-C (#736)

2 years ago10+% performance improvement of ggml_vec_dot_q4_0 on AVX2 (#654)
SebastianApel [Mon, 3 Apr 2023 07:52:28 +0000 (09:52 +0200)]
10+% performance improvement of ggml_vec_dot_q4_0 on AVX2 (#654)

* Performance improvement of AVX2 code
* Fixed problem with MSVC compiler
* Reviewer comments: removed double semicolon, deleted empty line 1962

2 years agoDefine non-positive temperature behavior (#720)
Ivan Stepanov [Mon, 3 Apr 2023 00:19:04 +0000 (03:19 +0300)]
Define non-positive temperature behavior (#720)

2 years agoRemove torch GPU dependencies from the Docker.full image (#665)
bsilvereagle [Sun, 2 Apr 2023 22:13:03 +0000 (15:13 -0700)]
Remove torch GPU dependencies from the Docker.full image (#665)

By using `pip install torch --index-url https://download.pytorch.org/whl/cpu`
instead of `pip install torch` we can specify we want to install a CPU-only version
of PyTorch without any GPU dependencies. This reduces the size of the Docker image
from 7.32 GB to 1.62 GB

2 years agoAdd a missing step to the gpt4all instructions (#690)
Thatcher Chamberlin [Sun, 2 Apr 2023 10:48:57 +0000 (06:48 -0400)]
Add a missing step to the gpt4all instructions (#690)

`migrate-ggml-2023-03-30-pr613.py` is needed to get gpt4all running.

2 years agoAdded api for getting/setting the kv_cache (#685)
Christian Falch [Sun, 2 Apr 2023 10:23:04 +0000 (12:23 +0200)]
Added api for getting/setting the kv_cache (#685)

The api provides access methods for retrieving the current memory buffer for the kv_cache and its token number.
It also contains a method for setting the kv_cache from a memory buffer.

This makes it possible to load/save history - maybe support --cache-prompt paramater as well?

Co-authored-by: Pavol Rusnak <redacted>
2 years agoggml : change ne to int64_t (#626)
Marian Cepok [Sun, 2 Apr 2023 10:21:31 +0000 (12:21 +0200)]
ggml : change ne to int64_t (#626)

2 years agoexamples : add gpt4all script (#658)
Leonardo Neumann [Sun, 2 Apr 2023 07:56:20 +0000 (04:56 -0300)]
examples : add gpt4all script (#658)

2 years agollama : do not allocate KV cache for "vocab_only == true" (#682)
Stephan Walter [Sun, 2 Apr 2023 07:18:53 +0000 (07:18 +0000)]
llama : do not allocate KV cache for "vocab_only == true" (#682)

Fixes sanitizer CI

2 years agomake : use -march=native -mtune=native on x86 (#609)
Fabian [Sun, 2 Apr 2023 07:17:05 +0000 (09:17 +0200)]
make : use -march=native -mtune=native on x86 (#609)

2 years agofix default params for examples/main (#697)
Murilo Santana [Sun, 2 Apr 2023 02:41:12 +0000 (23:41 -0300)]
fix default params for examples/main (#697)

2 years agopy: huggingface -> Hugging Face (#686)
Ikko Eltociear Ashimine [Sat, 1 Apr 2023 16:38:18 +0000 (01:38 +0900)]
py: huggingface -> Hugging Face (#686)

2 years agoreadme: replace termux links with homepage, play store is deprecated (#680)
rimoliga [Sat, 1 Apr 2023 14:57:30 +0000 (11:57 -0300)]
readme: replace termux links with homepage, play store is deprecated (#680)

2 years agoShow error message when -f fails
Slaren [Fri, 31 Mar 2023 18:03:48 +0000 (20:03 +0200)]
Show error message when -f fails

2 years agoEnable -std= for cmake builds, fix warnings (#598)
Stephan Walter [Fri, 31 Mar 2023 19:19:16 +0000 (19:19 +0000)]
Enable -std= for cmake builds, fix warnings (#598)

2 years agoOptimize AVX2 ggml_vec_dot_q4_0 (#642)
slaren [Fri, 31 Mar 2023 15:55:52 +0000 (17:55 +0200)]
Optimize AVX2 ggml_vec_dot_q4_0 (#642)

2 years agoAdd AVX acceleration (#617)
perserk [Fri, 31 Mar 2023 11:55:44 +0000 (16:55 +0500)]
Add AVX acceleration (#617)

* ggml : add AVX quantize_row_q4_0()

* ggml : add AVX ggml_vec_dot_q4_0()

* ggml : refactor AVX part of ggml_vec_dot_q4_0()

https://github.com/ggerganov/llama.cpp/pull/617#issuecomment-1489985645

2 years agopy : cleanup the code
Pavol Rusnak [Wed, 29 Mar 2023 19:31:24 +0000 (21:31 +0200)]
py : cleanup the code

- use f-strings where possible
- drop first param of encode/decode functions since "utf-8" is the default

2 years agodrop quantize.py (now that models are using a single file)
Pavol Rusnak [Thu, 30 Mar 2023 22:52:06 +0000 (00:52 +0200)]
drop quantize.py (now that models are using a single file)

2 years agoreadme : update supported models
Georgi Gerganov [Thu, 30 Mar 2023 19:31:54 +0000 (22:31 +0300)]
readme : update supported models

2 years agoIntroduce GGML migration tool for new file format
Justine Tunney [Thu, 30 Mar 2023 12:42:56 +0000 (05:42 -0700)]
Introduce GGML migration tool for new file format

If you deleted your old Meta LLaMA .pth files, then the
migrate-ggml-2023-03-30-pr613.py script will allow you to convert your
old ggml files into the new mmap()'able format.

See #613

2 years agoEnsure --mlock works properly with mmap() support
Justine Tunney [Thu, 30 Mar 2023 08:53:36 +0000 (01:53 -0700)]
Ensure --mlock works properly with mmap() support

2 years agoMake loading weights 10-100x faster
Justine Tunney [Wed, 29 Mar 2023 20:51:37 +0000 (13:51 -0700)]
Make loading weights 10-100x faster

This is a breaking change that's going to give you three benefits:

1. Your inference commands should load 100x faster
2. You may be able to safely load models 2x larger
3. You can run many concurrent inference processes

This was accomplished by changing the file format so we can mmap()
weights directly into memory without having to read() or copy them
thereby ensuring the kernel can make its file cache pages directly
accessible to our inference processes; and secondly, that the file
cache pages are much less likely to get evicted (which would force
loads to hit disk) because they're no longer competing with memory
pages that were needlessly created by gigabytes of standard i/o.

The new file format supports single-file models like LLaMA 7b, and
it also supports multi-file models like LLaMA 13B. Our Python tool
now merges the foo.1, foo.2, etc. files back into a single file so
that the C++ code which maps it doesn't need to reshape data every
time. That's made llama.cpp so much simpler. Much of its load code
has now been deleted.

Furthermore, this change ensures that tensors are aligned properly
on a 32-byte boundary. That opens the door to seeing if we can get
additional performance gains on some microprocessors, by using ops
that require memory alignment.

Lastly note that both POSIX and the Windows platform are supported

Fixes #91

2 years agoInitial windows support (untested)
Slaren [Wed, 29 Mar 2023 20:22:36 +0000 (22:22 +0200)]
Initial windows support (untested)

2 years agoAlways initialize mm_addr and mm_length in llama_model
Slaren [Wed, 29 Mar 2023 06:53:14 +0000 (08:53 +0200)]
Always initialize mm_addr and mm_length in llama_model

2 years agoUnmap the file in llama_free
Slaren [Wed, 29 Mar 2023 06:31:26 +0000 (08:31 +0200)]
Unmap the file in llama_free

2 years agoMake mmap_file static
Slaren [Wed, 29 Mar 2023 04:18:18 +0000 (06:18 +0200)]
Make mmap_file static

2 years agoFix ggml_init_params in quantize
Slaren [Wed, 29 Mar 2023 03:38:57 +0000 (05:38 +0200)]
Fix ggml_init_params in quantize

2 years agoAdd mmap support for model files
Slaren [Wed, 29 Mar 2023 00:03:43 +0000 (02:03 +0200)]
Add mmap support for model files

2 years agocmake : properly invoke CTest (#629)
Stephan Walter [Thu, 30 Mar 2023 17:56:59 +0000 (17:56 +0000)]
cmake : properly invoke CTest (#629)

2 years agoRemove unused variable (#607)
Casey Primozic [Thu, 30 Mar 2023 17:53:35 +0000 (10:53 -0700)]
Remove unused variable (#607)

* It seems some new warning were added recently that exposed this.  I wrote the code that included this unused variable originally and it is indeed not needed.

2 years agomake : fix darwin f16c flags check (#615)
david raistrick [Thu, 30 Mar 2023 17:34:45 +0000 (13:34 -0400)]
make : fix darwin f16c flags check (#615)

...there was no check.  ported upstream from https://github.com/zanussbaum/gpt4all.cpp/pull/2 (I dont see any clean path for upstream patches)

2 years agoggml : fix NEON signs (close #620, #622)
Georgi Gerganov [Thu, 30 Mar 2023 17:27:32 +0000 (20:27 +0300)]
ggml : fix NEON signs (close #620, #622)

2 years agoFix GGML_F32Cx8_STORE in AVX without F16C path (#619)
slaren [Thu, 30 Mar 2023 09:16:30 +0000 (11:16 +0200)]
Fix GGML_F32Cx8_STORE in AVX without F16C path (#619)

2 years agoci : re-enable AVX512 testing (Windows-MSVC) (#584)
anzz1 [Wed, 29 Mar 2023 20:44:39 +0000 (23:44 +0300)]
ci : re-enable AVX512 testing (Windows-MSVC) (#584)

* CI: Re-enable AVX512 testing (Windows-MSVC)

Now with 100% less base64 encoding

* plain __cpuid is enough here

2 years agoggml : init time on first ggml_init() call
Georgi Gerganov [Wed, 29 Mar 2023 19:15:34 +0000 (22:15 +0300)]
ggml : init time on first ggml_init() call

2 years agollama : fix compile warnings when reading the vocab
Georgi Gerganov [Wed, 29 Mar 2023 19:13:12 +0000 (22:13 +0300)]
llama : fix compile warnings when reading the vocab

2 years agoggml : add ARM_NEON dequantize_row_q4_1()
Georgi Gerganov [Wed, 29 Mar 2023 19:10:01 +0000 (22:10 +0300)]
ggml : add ARM_NEON dequantize_row_q4_1()

2 years agoggml : add ARM_NEON quantize_row_q4_1()
Georgi Gerganov [Wed, 29 Mar 2023 19:03:02 +0000 (22:03 +0300)]
ggml : add ARM_NEON quantize_row_q4_1()

2 years agoggml : add ARM_NEON ggml_vec_dot_q4_1()
Georgi Gerganov [Wed, 29 Mar 2023 18:47:33 +0000 (21:47 +0300)]
ggml : add ARM_NEON ggml_vec_dot_q4_1()

2 years agorename convert_ggml_to_pth.py -> convert-ggml-to-pth.py (#600)
Pavol Rusnak [Wed, 29 Mar 2023 18:09:25 +0000 (20:09 +0200)]
rename convert_ggml_to_pth.py -> convert-ggml-to-pth.py (#600)

to match filenames of other converters

2 years agoCreate chat-13B.bat (#592)
Thérence [Wed, 29 Mar 2023 17:21:09 +0000 (19:21 +0200)]
Create chat-13B.bat (#592)

* Create chat-13B.bat

Same script than chat-13B.sh, but for windows users.
Tested and working on windows 10/11 v 22H2

* Apply suggestions from code review

---------

Co-authored-by: anzz1 <redacted>
2 years agoreadme : fix typos
Georgi Gerganov [Wed, 29 Mar 2023 16:38:31 +0000 (19:38 +0300)]
readme : fix typos

2 years agoreadme : add GPT4All instructions (close #588)
Georgi Gerganov [Wed, 29 Mar 2023 16:37:20 +0000 (19:37 +0300)]
readme : add GPT4All instructions (close #588)

2 years agopy : add GPT4All conversion script
Georgi Gerganov [Wed, 29 Mar 2023 16:29:26 +0000 (19:29 +0300)]
py : add GPT4All conversion script

For now: copy-paste
Too much time for me to deduplicate the python code

2 years agollama : use the same threshold for OpenBLAS and ggml thread limiting (#577)
Maël Kerbiriou [Wed, 29 Mar 2023 16:10:07 +0000 (18:10 +0200)]
llama : use the same threshold for OpenBLAS and ggml thread limiting (#577)

2 years agoadd example of re-act pattern (#583)
Tobias Lütke [Wed, 29 Mar 2023 15:10:24 +0000 (17:10 +0200)]
add example of re-act pattern (#583)

* add example of re-act pattern

* spelling...

* fixed whitespace in reverse prompt issue

2 years agoFix GCC warning about binary literal (#595)
anzz1 [Wed, 29 Mar 2023 13:20:07 +0000 (16:20 +0300)]
Fix GCC warning about binary literal (#595)

0b10101010 -> 0xAA /* 0b10101010 */

2 years agoFix typo in llama.h (#593)
anzz1 [Wed, 29 Mar 2023 13:19:29 +0000 (16:19 +0300)]
Fix typo in llama.h (#593)

2 years agoEnable Fused-Multiply-Add (FMA) and F16C/CVT16 vector extensions on MSVC (#375)
anzz1 [Tue, 28 Mar 2023 19:44:29 +0000 (22:44 +0300)]
Enable Fused-Multiply-Add (FMA) and F16C/CVT16 vector extensions on MSVC (#375)

* Enable Fused-Multiply-Add (FMA) instructions on MSVC

__FMA__ macro does not exist in MSVC

* Enable F16C/CVT16 vector extensions on MSVC

__F16C__ macro does not exist in MSVC, but is implied with AVX2/AVX512

* MSVC cvt intrinsics

* Add __SSE3__ macro for MSVC too because why not

even though it's not currently used for anything when AVX is defined

2 years agoCI: fix subdirectory path globbing (#546)
anzz1 [Tue, 28 Mar 2023 19:43:25 +0000 (22:43 +0300)]
CI: fix subdirectory path globbing (#546)

- Changes in subdirectories will now be detecter properly
- (Windows-MSVC) AVX512 tests temporarily disabled

2 years agollama : fix linkage with mingw (#551)
anzz1 [Tue, 28 Mar 2023 18:23:09 +0000 (21:23 +0300)]
llama : fix linkage with mingw (#551)

* Revert 7e53955 (#542)

Still needs to be fixed properly

* Fix linking on mingw32

2 years agoggml : add AVX2 implementation of quantize_row_q4_1 (#515)
slaren [Tue, 28 Mar 2023 18:06:03 +0000 (20:06 +0200)]
ggml : add AVX2 implementation of quantize_row_q4_1 (#515)

* Add AVX2 implementation of quantize_row_q4_1

* Actually use AVX2

* Make quantize_row_q4_1 static

Co-authored-by: Georgi Gerganov <redacted>
---------

Co-authored-by: Georgi Gerganov <redacted>
2 years agopy : add temporary script to convert old ggml files to newer version (#539)
thement [Tue, 28 Mar 2023 17:55:42 +0000 (19:55 +0200)]
py : add temporary script to convert old ggml files to newer version (#539)

Co-authored-by: Jakub Horak <redacted>
2 years agopy : add capabiliy to convert from ggml back to torch or hf format for further consum...
Tai Duc Nguyen [Tue, 28 Mar 2023 17:51:29 +0000 (13:51 -0400)]
py : add capabiliy to convert from ggml back to torch or hf format for further consumption/training/finetuning (#403)