Commit Graph

667 Commits

Author SHA1 Message Date
2df044f9a1 Clippy after rebase. 2023-07-07 09:22:09 +02:00
1ec221a749 Fixing falcon example. 2023-07-07 09:13:55 +02:00
514b171f75 Getting tokio tasks stuck on smaller machines. 2023-07-07 09:13:28 +02:00
d38a926c14 Convert the logits to f32 before extracting them. (#102) 2023-07-07 08:07:57 +01:00
02b5c38049 Use cublas bf16. (#101) 2023-07-07 08:00:12 +01:00
c71a38deb7 Tweak the include order to include math.h first. (#100) 2023-07-07 06:47:25 +01:00
f114394456 Include the math.h file to get access to constants. (#99) 2023-07-07 06:42:57 +01:00
bac4ef40f3 Add some text generation pipeline for falcon. (#98) 2023-07-07 06:34:22 +01:00
2b8e8c9f14 Bugfixes. (#97) 2023-07-06 23:26:11 +01:00
a3f3b93d16 Add the call to dense in the attention layer. (#96) 2023-07-06 23:22:08 +01:00
0a2c82e301 Merge pull request #92 from LaurentMazare/sync_hub
Creating new sync Api for `candle-hub`.
2023-07-07 00:10:47 +02:00
666c6f07a1 Merge pull request #88 from LaurentMazare/fix_unsafe_loads
Fixing unsafe slow load (memcpy).
2023-07-07 00:09:56 +02:00
ce27073feb Update candle-core/src/safetensors.rs 2023-07-06 23:59:54 +02:00
0f679fe42e Fix some shape issues in falcon. (#95)
* Fix some shape issues.

* Use different dtypes.
2023-07-06 19:23:54 +01:00
4afa461b34 Sketch the Falcon model. (#93)
* Sketch the Falcon model.

* Add more substance to the falcon example.

* Falcon (wip).

* Falcon (wip again).

* Falcon inference.

* Get the weights from the api and properly generate the model.

* Use the proper model.

* Fix the file/revision names.

* Fix bias handling.

* Recompute the rot embeddings.

* Fix the input shape.

* Add the release-with-debug profile.

* Silly bugfix.

* More bugfixes.

* Stricter shape checking in matmul.
2023-07-06 19:01:21 +01:00
cae9212b70 Merge pull request #89 from LaurentMazare/extending_bert
Enabling `roberta` for the example (it's the same model as Bert, with just different naming.)
2023-07-06 16:29:26 +02:00
115629fe08 Creating new sync Api for candle-hub.
- `api::Api` -> `api::tokio::api` (And created new `api::sync::Api`).
- Remove `tokio` from all our examples.
- Using similar codebase for now instead of ureq (for simplicity).
2023-07-06 15:15:25 +02:00
f1e29cd405 Allow using mkl in tests. (#90) 2023-07-06 13:25:05 +01:00
3f291bdf9d Enabling roberta for the example (it's the same model as Bert, with
just different naming.)
2023-07-06 13:25:21 +02:00
054717e236 Fixing unsafe slow load (memcpy).
- Without the annotation, I think the rust compiler assumes it's all u8.

It did segfault trying to load `Roberta`.
2023-07-06 13:14:33 +02:00
dd60bd84bb MKL adjustments. (#87) 2023-07-06 11:37:27 +01:00
c297a50960 Add mkl support for matrix multiply. (#86)
* Fix some rebase issues.

* Use mkl instead.

* Use mkl in bert.

* Add the optional mkl feature.

* Conditional compilation based on the mkl feature.

* Add more mkl support.
2023-07-06 11:05:05 +01:00
cd230d26fe Whisper tweaks (#85)
* Isolate the decoding bits of the whisper example.

* Decode -> Decoder.

* Add the suppress tokens filter.

* More suppress tokens.
2023-07-06 09:13:20 +01:00
be9b493a75 Merge pull request #84 from LaurentMazare/whisper-cosmetic
Add the original whisper names as comment.
2023-07-06 07:57:46 +01:00
d3418f1cff Add the original whisper names as comment. 2023-07-06 07:57:03 +01:00
19ab5ea411 Merge pull request #78 from LaurentMazare/whisper_update
Adapting whisper for Hub use.
2023-07-06 07:21:58 +01:00
80d51ca088 Merge pull request #83 from LaurentMazare/dim-index-cat
Support dim indexes in cat.
2023-07-05 20:43:05 +01:00
e2bfbcb79c Support dim indexes in cat. 2023-07-05 20:39:08 +01:00
fc2ffcc72b Merge pull request #82 from LaurentMazare/dim-index
Add a simpler way to specify the dim index for some ops.
2023-07-05 20:24:43 +01:00
2c3d871b2e Add a simpler way to specify the dim index for some ops. 2023-07-05 20:22:43 +01:00
b7388bbf71 Merge pull request #81 from LaurentMazare/fix_kernel_build
Fixing the cached build.
2023-07-05 18:21:40 +02:00
fefdc0228a Fixing the cached build.
- rerun-if-change:src/ encapsulates any src modification (including file
  additions).
- Now not rewriting `src/lib.rs` everytime (it triggers new builds.)
- Also using modified timestamp to trigger kernel recompilation (should
  prevent skipping modified source files).
- Will also rewrite when a kernel is removed.
2023-07-05 18:12:17 +02:00
1db0fbee0d Merge pull request #80 from LaurentMazare/bert-avg-pool
Use avg pooling before the cosine similarity.
2023-07-05 17:06:40 +01:00
174e57d216 Use avg pooling before the cosine similarity. 2023-07-05 17:05:50 +01:00
a4a60a13fa Merge pull request #79 from LaurentMazare/bert-similarities
Add some sentence similarity comparison task to the bert example.
2023-07-05 16:51:25 +01:00
914e84deec Add some sentence similarity comparision to the bert example. 2023-07-05 16:49:57 +01:00
653c5049f8 Adding auto download of audio file. 2023-07-05 15:21:53 +00:00
e85573a4bd Adapting whisper for Hub use. 2023-07-05 14:35:27 +00:00
4e80319147 Merge pull request #77 from LaurentMazare/whisper-fix-emb
[whisper] Fix the position embeddings size.
2023-07-05 13:56:41 +01:00
bae6d07b7e Fix the position embeddings size. 2023-07-05 13:43:34 +01:00
e4fb8c45cc Merge pull request #69 from LaurentMazare/upgrade_bert
Upgrading bert example to work with `bert-base-uncased`.
2023-07-05 13:06:42 +01:00
93896f6596 Merge branch 'main' into upgrade_bert 2023-07-05 13:06:33 +01:00
bce28ab793 Merge pull request #76 from LaurentMazare/whisper-mel-bugfix
Bugfix for the mel filters in whisper.
2023-07-05 12:57:13 +01:00
d560855c2a Bugfix for the mel filters. 2023-07-05 12:56:04 +01:00
4df250cf37 Merge pull request #75 from LaurentMazare/whisper-mel
Whisper Mel spectogram computation
2023-07-05 12:21:13 +01:00
63e5a266bf Put everything together. 2023-07-05 12:19:21 +01:00
95f378ebb4 Read wav files. 2023-07-05 11:53:58 +01:00
26d1a7803f Load the mel filters. 2023-07-05 11:20:33 +01:00
c701ee33a7 Add the mel filters. 2023-07-05 11:05:08 +01:00
648d1511d5 PCM conversion. 2023-07-05 11:02:49 +01:00