Commit bd890dd
LLM pipeline implementation (#1040)
* WIP LLM pipeline and dataset implementation
* fixed issues preventing libraries from compiling, runtime errors not included
* upgrade TensorFlow to 2.18.0
* upgraded llm pipeline to use TFLite C++ api + small bug fixes
* basic flutter app support for icon and dataset
* added linux x86_64 config for internal testing
* updated bazel config to use SSE/MMX instructions
* fixed incorrect answer format and compression
* got pipeline and dataset to produce proper results + fixed issues where pipeline cannot handle an input size larger than the max prefill size
* added support for loadgen's token based performance measurement + implemented performance benchmark for LLM pipeline
* fixed bugs in inference process, first token function now handles only input and issue_query only handles output tokens
* optimized tensor retrieval for inference + added check for input size vs KV cache size
* clang-format
* mmlu dataset cleanup and formatting
* slight code cleanup
* fixed issue with genai ops import
* code/config cleanup
* add zero-shot option to MMLU constructor
* use function to detect which token is answer letter
* quick initial implementation of first token callback
* moved tokenizer to dataset side (possibly needs cleanup)
* added files needed for MMLU utils
* clang-format
* continued formatting
* code cleanup / issue_query signature update to vendor backends
* signature update for QTI/Samsung backends
* format
* formatted clang and bazel using docker based formatter
* reverted issue_query change for samsung + bazel formatting
* fix for MSVC C7555 error
* rough IFEval implementation using llm_instruction benchmark
* disabled XNNPACK AVX-VNNI for windows due to C2440 error
* moved accuracy calculation away from ProcessOutput, ifeval accuracy is calculated per instruction not per sample
* fixed issue with app not finding model/tokenizer
* properly format 0-shot prompts + allow for file/directory for model path
* formatting
* potential fix for windows C2440
* fix for aligned free for windows
* potential fix for IOS / windows CI issues
* ifeval check cleanup and bugfixes
* formatting
* all possible configs for removing eigen exceptions
* removed objc opts
* use token latencies in app
* enable exceptions for IOS
* disable FP16 AVX for x86 simulator
* attempt to enable exceptions for eigen
* 2nd attempt at enabling exceptions for IOS eigen
* fixed fexceptions syntax
* kitchen-sink approach to enable exceptions for IOS
* attempt to undefine EIGEN_EXCEPTIONS for IOS
* add global ovverride to disable eigen exceptions
* use ARM based macos for IOS build
* fixed and re-enabled eigen patch
* further fix for eigen patch
* even more patch fixing
* fixed typo in eigen patch
* fixed incorrect count in eigen patch
* force arm64 ios build
* use ARM64 simulator for IOS build
* use arm64 simulator for tflite on IOS
* set ios cpu argument for cpuinfo
* remvoed ios_sim prefix
* attempt at using arm64 simulator for IOS instead of x86
* attempt to force flutter to build ITs for arm64 only
* force arm64 for pods
* disable f16 instead of building for arm64
* more bazel config lines to disable fp16
* removed unavailable compiler flags
* provide patched fp16 lib with math workaround
* typo
* added patch arg
* created a math workaround patch compatible with fp16 version used by xnnpack
* datasets now provide token limits as inputs to pipeline
---------
Co-authored-by: Farook Al-Sammarraie <[email protected]>1 parent 0fd0922 commit bd890dd
File tree
69 files changed
+6368
-258
lines changed- flutter
- android
- assets
- icons
- cpp
- backends
- binary
- c
- datasets
- ifeval_utils
- mmlu_utils
- flutter
- proto
- lib
- data/results
- ui
- third_party
- mobile_back_apple/cpp/backend_coreml
- mobile_back_pixel/cpp/backend_tflite
- mobile_back_qti/cpp
- backend_mock_qti
- backend_qti
- mobile_back_samsung/samsung/lib
- include
- public/mbe_core
- mobile_back_tflite/cpp
- backend_dummy
- backend_tflite
- backend_settings
- ios
- neuron
- patches
- third_party
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+6368
-258
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| 33 | + | |
| 34 | + | |
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
| |||
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
44 | 78 | | |
45 | 79 | | |
46 | 80 | | |
47 | 81 | | |
| 82 | + | |
| 83 | + | |
48 | 84 | | |
49 | 85 | | |
50 | 86 | | |
| |||
73 | 109 | | |
74 | 110 | | |
75 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
76 | 116 | | |
77 | 117 | | |
78 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| |||
59 | 71 | | |
60 | 72 | | |
61 | 73 | | |
62 | | - | |
63 | | - | |
64 | 74 | | |
65 | | - | |
66 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
67 | 109 | | |
68 | | - | |
| 110 | + | |
69 | 111 | | |
70 | 112 | | |
71 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
339 | 396 | | |
340 | 397 | | |
341 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments