Commit graph

3108 commits

Author SHA1 Message Date
HanishKVC
7a3ac0cc15 Merge branch 'master' into hkvc_chaton_v3
Merge upstream as of 20240515IST11XY
2024-05-15 23:17:11 +05:30
HanishKVC
397249df61 DataUtilsString: string_as_hex and use direct log helpers 2024-05-15 21:14:24 +05:30
HanishKVC
bb3fe48c16 SimpCfg+DataUtilsString: Move string helpers to its own file 2024-05-15 19:25:31 +05:30
agray3
dc020985b8
Avoid unnecessarily disabling CUDA graphs (#7302)
As discussed in PR #6766, CUDA graphs were being disabled in the presence of long prompts.
This fixes the issue by avoiding the consective update counter from incrementing unnecessarily
for tokens in which cuda graphs are disabled due to batch size > 1.
2024-05-15 15:44:49 +02:00
slaren
344f9126cc
ggml : tag ggml_tensor::backend as deprecated (#7290) 2024-05-15 15:08:48 +02:00
HanishKVC
cdd91f5ad1 SimpCfg: Trap conversion error and raise appropriate exception 2024-05-15 18:37:15 +05:30
AidanBeltonS
9a17ab914b
Add missing " (#7303) 2024-05-15 17:56:30 +05:30
dm4
ea3b0590ee
embedding : free the batch after execution (#7297) 2024-05-15 15:01:12 +03:00
Georgi Gerganov
29499bb593
sync : ggml 2024-05-15 13:23:41 +03:00
John Balis
48aa8fd1f2
ggml : add ggml_upscale_ext (ggml/814)
* initial commit with CPU implementation of upscale to shape and test, cuda implementation next

* experimental commit to see if dst shape is correct

* test version

* test

* removed unnecessary params

* refactor

* fixed tests

* ggml : metal impl + cleanup + sycl dev warnings

* patched ggml_upscale cuda op to handle non-contiguous tensors, added test for non-contiguous behavior

* metal : fix upsacle op to support nb00 + style

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-05-15 13:23:33 +03:00
HanishKVC
4f5add68c6 GroupKV:Dump/Log type of the variant instance also 2024-05-15 14:28:48 +05:30
HanishKVC
dc03a7134a CMakeLists: base std::variantC++17, specificTest std::formatC++20 2024-05-15 12:56:05 +05:30
Johannes Gäßler
583fd6b000
server bench: fix bench not waiting for model load (#7284) 2024-05-15 08:44:16 +02:00
HanishKVC
4a15989000 ChatON: Forgot this note earlier 2024-05-15 03:38:41 +05:30
HanishKVC
a3d641b555 ChatON: Move loading from json file into its own file
Any program which wants to use json file to update/extend the
chaton's configurable template data, can include this new file
chaton_json.hpp, to get the reqd functionality.

Update chaton_meta_ok, _chaton_meta_validate_dump and
chaton_meta_load_json to either work with a passed ChatTemplates
instance, or fallback to the compiled-in global instance of same.
2024-05-15 03:00:25 +05:30
HanishKVC
14c28e717e GroupKV+: dump cleanup - forgot to commit earlier 2024-05-15 02:11:26 +05:30
HanishKVC
8975de996b ChatON: Update Notes to match the updated semantics and flows
The initial version was rooted around a json object, while the new
version is rooted around a MapOfMapOfVariant (GroupKV), which could
be preloaded with chat templates info at compile time itself and
used as is. Or optionally one could allow the configurable template
data to be extended/updated at runtime from a text(/SimpCfg)/json
file.
2024-05-14 21:54:52 +05:30
Georgi Gerganov
9f773486ab
script : sync ggml-rpc 2024-05-14 19:14:38 +03:00
Georgi Gerganov
e8a7fd4fb0
metal : support FA without mask + add asserts (#7278)
* ggml : fa without mask + add asserts

ggml-ci

* metal : support non-contiguous KV

ggml-ci
2024-05-14 19:09:30 +03:00
Georgi Gerganov
a5e3fde857 sync : ggml
ggml-ci
2024-05-14 19:08:09 +03:00
Georgi Gerganov
f308ea7059 metal : tune soft_max number of threads (whisper/0) 2024-05-14 19:08:09 +03:00
Georgi Gerganov
c3c88f296a ggml : try fix ppc64 (whisper/0) 2024-05-14 19:08:09 +03:00
Przemysław Pawełczyk
182adefcf3 ggml : expose SSE3 and SSSE3 for MSVC when AVX is available (whisper/2128) 2024-05-14 19:08:09 +03:00
Hong Bo PENG
0d26d8ccd8 ggml : optimize for ppc64le using VSX intrinsics (ggml/784)
* optimize for ppc64le using VSX intrinsics

* 1. code clean up by removing comments about overflow concern.

2. fix typo in suffix of scaling.

* Continue to fix typo in suffix of scaling for QK_K <> 256

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-05-14 19:08:09 +03:00
HanishKVC
f8c0b474ec ChatON+:RenameTo chaton_meta_load_json to match semantic
Also add simple note wrt itself and its helper.
2024-05-14 21:37:05 +05:30
HanishKVC
bd5c39e0f0 ChatOn+GroupKV: Cleanup a bit, including using debug logging 2024-05-14 21:22:48 +05:30
Steve Grubb
4f0263633b
server: free sampling contexts on exit (#7264)
* server: free sampling contexts on exit

This cleans up last leak found by the address sanitizer.

* fix whitespace

* fix whitespace
2024-05-14 16:11:24 +02:00
HanishKVC
bb9ce52b11 ChatON+: ValidateDump dumps All, wrapped in optional LDBUG_LN
GroupKV dump adds needed ":" seperator on its own, so calling
functions can just pass the tag string they want in the log without
worrying about any demarkation.
2024-05-14 18:45:25 +05:30
Brian
1265c670fd
Revert "move ndk code to a new library (#6951)" (#7282)
This reverts commit efc8f767c8.
2024-05-14 16:10:39 +03:00
Radoslav Gerganov
5e31828d3e
ggml : add RPC backend (#6829)
* ggml : add RPC backend

The RPC backend proxies all operations to a remote server which runs a
regular backend (CPU, CUDA, Metal, etc).

* set TCP_NODELAY

* add CI workflows

* Address review comments

* fix warning

* implement llama_max_devices() for RPC

* Address review comments

* Address review comments

* wrap sockfd into a struct

* implement get_alignment and get_max_size

* add get_device_memory

* fix warning

* win32 support

* add README

* readme : trim trailing whitespace

* Address review comments

* win32 fix

* Address review comments

* fix compile warnings on macos
2024-05-14 14:27:19 +03:00
slaren
541600201e
llama : disable pipeline parallelism with nkvo (#7265) 2024-05-14 17:33:42 +10:00
Elton Kola
efc8f767c8
move ndk code to a new library (#6951) 2024-05-14 17:30:30 +10:00
Haggai Nuchi
e0f556186b
Add left recursion check: quit early instead of going into an infinite loop (#7083)
* Add left recursion check: quit early instead of going into an infinite loop

* Remove custom enum, rename left recursion check and move to "grammar internal" section, add handling for edge case where a leftmost nonterminal may be empty

* Remove unnecessary declaration
2024-05-14 15:25:56 +10:00
Ryuei
27f65d6267
docs: Fix typo and update description for --embeddings flag (#7026)
- Change '--embedding' to '--embeddings' in the README
- Update the description to match the latest --help output
- Added a caution about defining physical batch size
2024-05-14 15:20:47 +10:00
HanishKVC
28ddd2c474 ChatON: ChatParts dump returns info str rather than direct logging 2024-05-14 02:21:16 +05:30
HanishKVC
4dfd10a40d ChatON: Move core templating/tagging code into ChatTemplates class
However still retain the wrappers, which work with a predefined
global instance of ChatTemplates.
2024-05-14 01:49:38 +05:30
HanishKVC
600653dae2 ChatON:Optional control of MsgCntBasedTagging
Use same to bypass any msg count based tagging behaviour for the
single message tagging through its helper wrapper.
2024-05-14 01:27:24 +05:30
HanishKVC
6e13c0c87e ChatON:Control SystemMsgSuffix+End tags only wrt 1st system msg
Make it similar to user-begin+prefix control. ie only wrt 1st msg
of respective type.
2024-05-14 01:19:04 +05:30
HanishKVC
3fcaf19967 ChatON+:Multi4Single: applyGlobalIfAny flag wrt templating api
Given that now the multi chat templating logic itself is used to
apply chat templating/tagging to a single chat message, so give
flexibility of deciding whether global tags if any should be
applied or not wrt the core tagging logic.

examples/main inturn updated to not apply global tags if any wrt
the system message. Also the user messages already dont apply
global tags if any, as its currently implemented to build on the
existing in-prefix/suffix and anitprompt flow.
2024-05-14 01:00:17 +05:30
HanishKVC
8165bd4035 ChatON:WIP:chaton_tmpl_apply_single build on multi msg tagging
To avoid having to duplicate any hardcoding in future, wrt any new
model/chat-template-standard, at multiple locations, remove the
single message templating code with a wrapper which does the same
but using the multi-msg templating helper.
2024-05-14 00:44:47 +05:30
HanishKVC
fe0c9ce646 ChatON:BasicCheck+:return a string with info, dont directly log 2024-05-14 00:25:00 +05:30
compilade
ee52225067
convert-hf : support direct Q8_0 conversion (#7234)
* convert-hf : support q8_0 conversion

* convert-hf : add missing ftype

This was messing with the checksums otherwise.

* convert-hf : add missing ftype to Baichuan and Xverse

I didn't notice these on my first pass.
2024-05-13 14:10:51 -04:00
Georgi Gerganov
614d3b914e
llama : less KV padding when FA is off (#7257)
ggml-ci
2024-05-13 17:15:15 +03:00
k.h.lai
30e70334f7
llava-cli: fix base64 prompt (#7248) 2024-05-14 00:02:36 +10:00
HanishKVC
efbb87dba6 ChatON:ChatTemplates:TmplBasicCheck 2024-05-13 17:50:15 +05:30
HanishKVC
0cfe99076d ChatON:ChatTemplates: TmplExists, TmplGetKey, TmplRoleGetKeys
ChatTemplate directly supports these now, as well as the existing
global instance based corresponding helpers depend on same.
2024-05-13 17:30:47 +05:30
Johannes Gäßler
1c570d8bee
perplexity: add BF16 vs. FP16 results (#7150) 2024-05-13 13:03:27 +02:00
HanishKVC
184ac322e3 ChatON: Make json_get efficient and flexible wrt its calling
Also explicitly indicate that we are looking at a chain of keys
2024-05-13 16:21:02 +05:30
Neo Zhang
948f4ec7c5
[SYCL] rm wait() (#7233) 2024-05-13 18:11:26 +08:00
Joan Fontanals
9aa672490c
llama : rename jina tokenizers to v2 (#7249)
* refactor: rename jina tokenizers to v2

* refactor: keep refactoring non-breaking
2024-05-13 11:35:14 +03:00