d46670f7c0
Tmp state.
2023-11-20 14:12:57 +01:00
f710fab02e
Fixing the kernels + launches to make them faster.
...
Cool work by @ivarflakstad
Co-authored-by: Ivar Flakstad <69173633+ivarflakstad@users.noreply.github.com >
2023-11-20 14:12:57 +01:00
f82bf2d915
Adding indexing.
...
Co-authored-by: Ivar Flakstad <69173633+ivarflakstad@users.noreply.github.com >
2023-11-20 14:12:57 +01:00
df6814f34e
Refactor to simplify our lives for settings the params in the encoder.
2023-11-20 14:12:57 +01:00
39406a6721
Adding the actual backend
2023-11-20 14:12:56 +01:00
976ad9f9c2
Remove tracing.
2023-11-20 14:12:29 +01:00
a4c4a56429
Metal part 1 - Scaffolding for metal.
2023-11-20 14:12:05 +01:00
f49bf6a81d
Fix OpenChat 3.5 tokenizer ( #1347 )
2023-11-19 18:48:04 +00:00
992a788da1
Add OpenChat 3.5 to quantized examples ( #1346 )
...
* Add OpenChat to quantized examples
* Add chat prompt
* Make the openchat example more in line with the other models.
* Fix a typo.
---------
Co-authored-by: laurent <laurent.mazare@gmail.com >
2023-11-19 18:28:52 +00:00
8d8f48c60c
feat: add test for individual onnx ops ( #1332 )
...
* feat: add test for individual onnx ops
* fix: prefer consts when possible
* feat: add move op tests
2023-11-19 08:17:09 +01:00
d31f11035f
Support for CumSum in ONNX models. ( #1340 )
2023-11-17 22:03:40 +00:00
9ab3f9729f
Use the whisper-v3 tokenizer now that it has been added. ( #1337 )
...
* Use the whisper-v3 tokenizer now that it has been added.
* Use the appropriate nospeech token.
2023-11-16 22:10:31 +00:00
a1f41ab37b
feat: adds reset_kv_cache ( #1335 )
2023-11-16 21:17:42 +00:00
92a05b51cf
fix: address clippy 0.1.74 issues ( #1336 )
...
- clippy::needless-borrows-for-generic-args
- clippy::reserve-after-initialization
2023-11-16 21:15:22 +00:00
c6763e3b41
Add a simple implementation of cumsum. ( #1334 )
...
* Add a simple implementation of cumsum.
* Add another test.
2023-11-15 21:11:15 +00:00
347e31c9ff
Add the tril/triu/eye ops. ( #1333 )
...
* Add tril/triu/eye.
* Revert the metal crate tweak.
2023-11-15 20:34:37 +00:00
f4fcf60900
Update readme.md ( #1322 )
...
Updating the readme to coincide with other examples. If you try to run it as previously written, you will get a "cannot find the path specified" error.
2023-11-12 09:46:19 +00:00
12561b31d3
Fix pose estimation image path ( #1326 )
2023-11-12 09:45:26 +00:00
a209ce8ceb
Update for 0.3.1. ( #1324 )
2023-11-11 18:48:52 +00:00
f1e678b39c
Mention the Yi-6b/Yi-34b models in the readme. ( #1321 )
2023-11-11 12:39:11 +01:00
a007f8fdb4
Add the Yi-6b and Yi-34b models. ( #1320 )
...
* Add the Yi-6b model.
* Add the 34b model.
* Add the yi example.
* Fix the weight file names.
2023-11-11 12:00:48 +01:00
2341aa079e
Fix quantized zephyr chat prompt ( #1314 ) ( #1317 )
...
* Fix quantized zephyr chat prompt (#1314 )
* Avoid using a mutable variable.
---------
Co-authored-by: Laurent <laurent.mazare@gmail.com >
2023-11-11 09:14:12 +01:00
9e666d4229
Add the var method. ( #1315 )
...
* Add the var method.
* Add a test.
2023-11-10 22:47:57 +01:00
1b12142a02
Add min to buckets in relative_position_bucket ( #1312 )
2023-11-10 11:57:25 +01:00
d2c3f14773
Fix for flash-attn. ( #1310 )
...
Co-authored-by: laurent <laurent@par2dc5-ai-prd-cl01dgx02.cm.cluster >
2023-11-10 10:27:27 +01:00
26c4e5bf1d
Metal part 1 - Scaffolding for metal. ( #1308 )
...
* Metal part 1 - Scaffolding for metal.
* Remove tracing.
2023-11-10 08:35:48 +01:00
18d30005c5
Add support to UL2 model family ( #1300 )
...
* Add support to UL2 model family
* Update docs with UL2
* Create ActivationWithOptionalGating to avoid polluting activations
* Also refactor quantized t5
* Remove useless conversion
* Revert Activation::NewGelu name change
* Remove useless return
* Apply rustfmt and clippy recommendations
* Reuse t5::ActivationWithOptionalGating in quantized version
* (cosmetic change) use a match rather than ifs + avoid early returns.
---------
Co-authored-by: Laurent <laurent.mazare@gmail.com >
2023-11-09 18:55:09 +01:00
6958384327
Add support for TrOCR Model ( #1303 )
...
* add bce with logit loss
* add bce with logit loss
* remove imports
* fix tiny bug
* add test documentation and refactor function
* fix test cases and formatting
* add trocr model
* fix formatting
* commit the actual model lol
* more formatting
* remove tokenizer config
2023-11-09 18:49:17 +01:00
e6697471bb
Add weight and bias functions to LayerNorm ( #1306 )
2023-11-09 16:09:01 +01:00
73d02f4f57
fix: negative axis ( #1296 )
...
* fix: negative axis
* Use normalize_axis.
---------
Co-authored-by: Laurent <laurent.mazare@gmail.com >
2023-11-08 23:28:21 +01:00
f772213e84
Fix bug introduced in madlad PR ( #1298 )
2023-11-08 17:55:46 +01:00
2feb0b054f
Add the mel filters for 128 bins. ( #1295 )
2023-11-08 08:23:53 +01:00
2d28497197
Preliminary support for whisper v3. ( #1294 )
...
* Preliminary support for whisper v3.
* Add the missing files.
2023-11-08 06:42:52 +01:00
f3a4f3db76
PyO3: Add optional candle.onnx
module ( #1282 )
...
* Start onnx integration
* Merge remote-tracking branch 'upstream/main' into feat/pyo3-onnx
* Implement ONNXModel
* `fmt`
* add `onnx` flag to python ci
* Pin `protoc` to `25.0`
* Setup `protoc` in wheel builds
* Build wheels with `onnx`
* Install `protoc` in manylinux containers
* `apt` -> `yum`
* Download `protoc` via bash script
* Back to `manylinux: auto`
* Disable `onnx` builds for linux
2023-11-08 06:37:50 +01:00
7920b45c8a
Support for timegroupnorm in encodec. ( #1291 )
2023-11-07 22:39:59 +01:00
d4a45c936a
Quantized model small tweaks ( #1290 )
...
* Support the shape op in ONNX.
* Share the axis normalization bits.
* Add some limited support for gather.
* Unsqueeze.
* Comparison with broadcasting.
* Add Not + handle i32.
* Tweaks for the quantized model.
2023-11-07 21:21:37 +01:00
c912d24570
Update README: Move T5 to Text to Text section ( #1288 )
...
I think it makes more sense to have it there, since it's a seq2seq model with cross attention, and not a LM. There are also Decoder only T5 models that work as LMs, but that's not the standard.
2023-11-07 16:14:04 +01:00
d5c2a7b64b
Add info about MADLAD-400 in readme files ( #1287 )
2023-11-07 15:21:59 +01:00
508f811b93
Add support for MADLAD400 ( #1285 )
...
* Add support for madlad
* Add support for quantized MADLAD
2023-11-07 05:35:37 +01:00
a773a4b22b
[ONNX] Support a couple more ops. ( #1284 )
...
* Support the shape op in ONNX.
* Share the axis normalization bits.
* Add some limited support for gather.
* Unsqueeze.
* Comparison with broadcasting.
* Add Not + handle i32.
2023-11-06 22:44:58 +01:00
5a363dbc26
Adds check for 7b-zephyr and uses correct template ( #1283 )
...
* Adds check for 7b-zephyr and uses correct template
* Handle zephyr as mistral.
* Disable the protoc bits of the CI.
---------
Co-authored-by: Laurent <laurent.mazare@gmail.com >
2023-11-06 21:05:39 +01:00
abc4f698c5
Add candle-sampling ( #1278 )
2023-11-06 12:53:29 +01:00
a923e8b53a
Add a link to candle-ext to README.md ( #1277 )
2023-11-06 12:44:39 +01:00
2a45bcf943
Put the onnx example behind a feature flag. ( #1276 )
...
* Put the onnx example behind a feature flag.
* Exclude the onnx bits from the workspace.
* README tweaks.
2023-11-06 07:45:07 +01:00
47f4ddb011
Added info about missing protoc ( #1275 )
...
Co-authored-by: figgefigge <fredric.1337mail.com>
2023-11-06 06:47:32 +01:00
f365a075e5
Add more models to the onnx example. ( #1273 )
...
* Add more models to the onnx example.
* Input validation.
* Input validation.
* Bugfix.
* Implement clip.
* BatchNorm support.
* Get the efficientnet onnx to work.
2023-11-05 16:57:26 +01:00
60fdab4e17
Detach all grads during backprop. ( #1243 )
...
* Detach all grads during backprop.
* Add an environment variable to select the backprop behavior.
* Update the comment.
2023-11-05 14:07:41 +01:00
928a9d906e
[ONNX] Do not generate values for constants. ( #1272 )
...
* Do not generate values for constants.
* Add an onnx based example using squeezenet.
2023-11-05 11:23:14 +01:00
d1d89bac1f
feat: download cifar dataset parquet files ( #1259 )
2023-11-05 10:55:49 +01:00
39ad840a90
Better tensor initialization in ONNX. ( #1270 )
...
* Better tensor initialization in ONNX.
* MaxPool support.
* Add AvgPool.
* Get the squeezenet example to work.
2023-11-04 22:17:45 +01:00