Commit Graph

1498 Commits

Author SHA1 Message Date
YangNianYi 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
Juarez Bochi f772213e84
Fix bug introduced in madlad PR (#1298) 2023-11-08 17:55:46 +01:00
Laurent Mazare 2feb0b054f
Add the mel filters for 128 bins. (#1295) 2023-11-08 08:23:53 +01:00
Laurent Mazare 2d28497197
Preliminary support for whisper v3. (#1294)
* Preliminary support for whisper v3.

* Add the missing files.
2023-11-08 06:42:52 +01:00
Lukas Kreussel 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
Laurent Mazare 7920b45c8a
Support for timegroupnorm in encodec. (#1291) 2023-11-07 22:39:59 +01:00
Laurent Mazare 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
Juarez Bochi 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
Juarez Bochi d5c2a7b64b
Add info about MADLAD-400 in readme files (#1287) 2023-11-07 15:21:59 +01:00
Juarez Bochi 508f811b93
Add support for MADLAD400 (#1285)
* Add support for madlad

* Add support for quantized MADLAD
2023-11-07 05:35:37 +01:00
Laurent Mazare 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
DTJ11235 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
Eric Buehler abc4f698c5
Add candle-sampling (#1278) 2023-11-06 12:53:29 +01:00
YiiSh a923e8b53a
Add a link to candle-ext to README.md (#1277) 2023-11-06 12:44:39 +01:00
Laurent Mazare 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
figgefigge 47f4ddb011
Added info about missing protoc (#1275)
Co-authored-by: figgefigge <fredric.1337mail.com>
2023-11-06 06:47:32 +01:00
Laurent Mazare 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
Laurent Mazare 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
Laurent Mazare 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
drbh d1d89bac1f
feat: download cifar dataset parquet files (#1259) 2023-11-05 10:55:49 +01:00
Laurent Mazare 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
Laurent Mazare b5e4f84bed
Refactor the onnx attribute getters. (#1268)
* Refactor the onnx attribute getters.

* Add get-attr-opt.

* Add support for convolutions.

* Add support for convolutions.
2023-11-04 21:31:48 +01:00
drbh 7051fb8098
feat: add backprop for elu (#1269)
* feat: add backprop for elu

* Cosmetic tweaks.

---------

Co-authored-by: Laurent <laurent.mazare@gmail.com>
2023-11-04 21:26:41 +01:00
Laurent Mazare dc68c130e4
Support more ONNX ops. (#1267)
* Add LogSoftmax.

* Support for Transpose.
2023-11-04 15:10:14 +01:00
Laurent Mazare bc9a1bf239
Improve the ONNX basic example + bugfixes (#1266)
* Generate some zeros tensor in the onnx simple-eval example.

* Fix the casting operation.

* Support more ops.

* Handle reshape.

* Concat.

* Softmax.
2023-11-04 10:02:47 +01:00
Laurent Mazare f7c957d64f
ONNX casting support. (#1265)
* ONNX casting support.

* Handle tensor constants.

* Bugfix the binary ops.
2023-11-04 08:34:24 +01:00
Laurent Mazare 8cbb9d0e6c
Add some preliminary ONNX support (#1260)
* Add the onnx protos.

* Move the reading bits.

* Install protoc on the CI.

* Install protoc on the cuda CI too.

* Use clap for the onnx tool.

* Tweak the CI protoc install.

* Add some simple evalution function.

* Add some binary operator support.
2023-11-04 06:36:05 +01:00
Yuchao Zhang bfe95115c6
Update README.md (#1264) 2023-11-04 05:32:32 +01:00
Laurent Mazare 6fa3151820
Allow using gguf-v3 files. (#1262) 2023-11-03 23:07:53 +01:00
Radamés Ajna 0a58886ccb
add distil-whisper link (#1261) 2023-11-03 21:34:42 +01:00
drbh 3173b1ce3b
feat: impl backprop for erf and gelu-erf (#1258)
* impl backprop for erf anf gelu-erf

* feat: unary tests added for erf and gelu-erf

* fix: (clippy) remove immediately dereferenced ref

* fix: improve comments with pytorch code snippet

* fix: adjust comment typo in backprop impl
2023-11-03 21:32:30 +01:00
ealmloff ad63f20781
add Kalosm to the list of external resources (#1257) 2023-11-03 19:16:46 +01:00
Laurent Mazare 1cfc5d6d0c
Backprop support for conv1d (cpu only for now). (#1255) 2023-11-03 14:23:53 +01:00
Laurent Mazare b07b2350b6
Test for the transposed conv1d. (#1254) 2023-11-03 13:10:28 +01:00
Eric Buehler 1b5063f3ca
Add vllm external resource (#1253) 2023-11-03 12:40:31 +01:00
Laurent Mazare 3b0d1e7d03
Transposed conv1d in candle-nn. (#1252) 2023-11-03 11:18:25 +01:00
Laurent Mazare be4555c5a5
Add the conv-transpose1d op. (#1251)
* Skeleton structure for conv-transpose1d.

* CPU implementation for conv-transpose1d.
2023-11-03 09:44:46 +01:00
Laurent Mazare 6975c65112
Share the layer-norm implementation. (#1248) 2023-11-03 06:30:05 +01:00
Laurent Mazare a2a20aeecc
Add the swiglu activation from the chatglm PR. (#1246) 2023-11-02 20:01:34 +01:00
Laurent Mazare e08fbb6543
Add support for distil whisper (#1245)
* Add support for distil-whisper.

* Add distil-large.

* Rename the large model.
2023-11-02 19:32:35 +01:00
jamjamjon d39d0c40fd
Add hard-sigmoid and hard-swish activations (#1244)
* Add hard-sigmoid and hard-swish activations

* Update ops.rs

* Use / rather than div.

---------

Co-authored-by: Laurent <laurent.mazare@gmail.com>
2023-11-02 18:20:27 +01:00
Laurent b97463098c llama2-c wasm fix. 2023-11-02 10:31:47 +01:00
Laurent Mazare fbd69f952c
Lazy detach. (#1242) 2023-11-02 07:33:48 +00:00
Laurent Mazare 6c990a33ea
Remove the unused pragma for marian. (#1236) 2023-11-01 20:04:52 +00:00
Laurent Mazare 1704f1b3ae
Consolidate the with-tracing usage. (#1234) 2023-11-01 18:21:36 +00:00
Laurent Mazare 693fad511c
Preliminary support for ssd1b. (#1233) 2023-11-01 14:37:52 +00:00
Laurent Mazare 36fb84f038
Add a hack for generating random uniform/normal for f16/bf16. (#1228) 2023-10-31 20:27:59 +00:00
Laurent Mazare c12ad45562
Add a KV cache to marian decoding. (#1226) 2023-10-31 08:47:44 +00:00
Laurent Mazare 7d0202710b
Instructions for generating the tokenizer configs for marian-mt. (#1225) 2023-10-31 07:56:26 +01:00
Laurent Mazare 392a00a147
Add support for the marian base model. (#1221) 2023-10-30 19:20:36 +00:00