6a446d9d73
convert pytorch's tensor in Python API ( #1172 )
...
* convert pytorch's tensor
* separate tests for convert pytorch tensor
2023-10-25 19:39:14 +01:00
0acd16751d
Expose the fields from batch-norm. ( #1176 )
2023-10-25 15:35:32 +01:00
c698e17619
Enable the test for meshgrid + fix the implementation. ( #1175 )
2023-10-25 13:47:54 +01:00
e4c9adfdbe
Implemented meshgrid ( #1174 )
...
* Implemented meshgrid
* Resolved feedback from LaurentMazare
* Rustfmt
* Updated docstring
* Removed outdated error mode from docstring
2023-10-25 12:49:11 +01:00
b6053b938b
[Wasm] Add puffin phi model to wasm ( #1166 )
...
* load config from file, add puffin phi links
* format
* add prompt examples
2023-10-25 07:09:03 +01:00
45dbe541bc
fix ucopy for f64
tensors ( #1170 )
2023-10-24 17:06:03 +01:00
7bd0faba75
Add support for accelerate in the pyo3 bindings. ( #1167 )
2023-10-24 06:34:37 +01:00
807e3f9f52
derivative for GELU ( #1160 )
...
* derivative for GELU
* add tests
2023-10-23 20:23:45 +01:00
eae94a451b
PyO3: Add mkl
support ( #1159 )
...
* Add `mkl` support
* Set `mkl` path on linux
2023-10-23 20:10:59 +01:00
86e1803191
Add Binary Cross Entropy With Logit Loss to nn crate ( #1157 )
...
* 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
2023-10-23 17:12:44 +01:00
25c3cc4149
Mention the flash-attention restriction in the readme. ( #1158 )
2023-10-23 10:26:56 +01:00
a11af79e23
Add a quantized blip model. ( #1155 )
...
* Add a quantized blip model.
* Integrate the quantized blip model to the actual example.
2023-10-22 20:33:25 +01:00
8a82d623e5
Handle LongStorage in pytorch checkpoints. ( #1152 )
2023-10-22 18:34:36 +01:00
df2f89b6cf
Add some KV cache to blip. ( #1150 )
...
* Add some KV cache to blip.
* Mention BLIP in the readme.
2023-10-22 09:44:48 +01:00
62fc965617
Expose the track-op method. ( #1148 )
2023-10-22 06:57:03 +01:00
5b32c2a41e
Remove the unused pragma and properly apply the bias. ( #1147 )
2023-10-22 06:47:40 +01:00
3115fe42e4
Blip attention mask + readme ( #1146 )
...
* Add the attention mask to the blip model.
* Add a readme.
2023-10-21 22:44:13 +01:00
2531b13bf8
Blip fixes ( #1145 )
...
* Some fixes for the blip example.
* Stop generating on sep tokens.
* Clippy fixes.
* rustfmt.
2023-10-21 21:34:48 +01:00
0d9bb4eb18
Add the blip example. ( #1144 )
...
* Add the blip example.
* Tweak the example.
* Implement the cross-attn logic.
* Fix some shape mismatches.
* Get some logits out.
* Get some caption to be generated.
2023-10-21 20:05:02 +01:00
e8f760ee44
Add get_on_dim. ( #1142 )
2023-10-21 15:01:38 +01:00
94e3373883
Blip forward pass ( #1141 )
...
* More forward methods for the blip model.
* Blipping continues.
2023-10-21 10:19:23 +01:00
34d9e91748
Add the blip image captioning model ( #1140 )
...
* Blip text model.
* Blip vision bits.
* Blippity.
* More blip.
2023-10-20 22:09:11 +01:00
cfb423ab76
PyO3: Add CI ( #1135 )
...
* Add PyO3 ci
* Update python.yml
* Format `bert.py`
2023-10-20 19:05:14 +01:00
7366aeac21
Make func cloneable. ( #1137 )
2023-10-20 16:28:50 +01:00
99cf13e8e2
Add the sequential layer. ( #1136 )
2023-10-20 16:08:50 +01:00
b43ab6cd1d
PyO3: Add None
and Tensor
indexing to candle.Tensor
( #1098 )
...
* Add proper `None` and `tensor` indexing
* Allow indexing via lists + allow tensor/list indexing outside of first dimension
2023-10-20 09:59:00 +01:00
31ca4897bb
Readme updates. ( #1134 )
2023-10-20 09:08:39 +01:00
55351ef57d
Add some vision transformers models ( #1132 )
...
* Start adding vision-transformers.
* Add self-attn.
* More vision transformers.
* vit-vit.
* Add the actual vit model.
* Add the example code for the vision transformers.
2023-10-19 22:24:18 +01:00
6684b7127a
PyO3: Add pytorch like .to()
operator to candle.Tensor
( #1100 )
...
* add `.to()` operator
* Only allow each value to be provided once via `args` or `kwargs`
2023-10-19 21:46:21 +01:00
93c25e8844
Expose the larger resnets (50/101/152) in the example. ( #1131 )
2023-10-19 13:48:28 +01:00
cd53c472df
Support ResNet 50/101/152. ( #1130 )
2023-10-19 10:48:31 +01:00
6f76383f38
Add a readme for the resnet example. ( #1129 )
2023-10-19 09:58:50 +01:00
8e773cc0c6
Experiment with resnet ( #1128 )
...
* Add some preliminary support for resnet.
* Add an actual resnet example.
2023-10-19 09:25:03 +01:00
87eb1658e1
Add pad_with_same. ( #1127 )
...
* More model cloning.
* More cloning on quantized models.
* Add pad-with-same.
* Add some tests.
2023-10-18 23:13:37 +01:00
902d0b9166
More model cloning. ( #1126 )
...
* More model cloning.
* More cloning on quantized models.
2023-10-18 21:55:46 +01:00
185b54a33b
Make some model cloneable. ( #1125 )
2023-10-18 19:30:47 +01:00
620c94d12e
Add support for Zephyr-7b in the quantized model. ( #1124 )
2023-10-18 17:31:26 +01:00
86e7d539d2
Add the quantized mpt model. ( #1123 )
...
* Add the quantized mpt model.
* Support the quantized model for replit-code.
2023-10-18 16:29:38 +01:00
cb034506cd
Remove the unused pragma in mpt. ( #1122 )
2023-10-18 15:47:50 +01:00
63c204c79e
Add a mention to the replit-code model in the readme. ( #1121 )
2023-10-18 11:27:23 +01:00
767a6578f1
MPT alibi fixes. ( #1120 )
...
* MPT alibi fixes.
* Some more fixes.
* Finally get the model to return some sensible outputs.
* Add a readme.
2023-10-18 10:58:05 +01:00
662c186fd5
Better error message when overflowing in narrow. ( #1119 )
2023-10-18 08:40:14 +01:00
2cd745a97c
MPT fixes. ( #1117 )
...
* MPT fixes.
* Another couple fixes.
* Another shape fix.
2023-10-17 21:53:31 +01:00
a72b50e2c0
Build alibi bias. ( #1115 )
...
* Build alibi bias.
* Apply the alibi attention bias.
* Add the replit-code example.
2023-10-17 20:41:37 +01:00
872c3f14b0
Add the MPT model. ( #1114 )
...
* Add the MPT model.
* Add ffn and block.
* Forward pass for the mpt block.
* Repeat-kv.
2023-10-17 16:06:48 +01:00
f9e93f5b69
Extend stub.py
to accept external typehinting ( #1102 )
2023-10-17 11:07:26 +01:00
b355ab4e2e
Always broadcast magic methods ( #1101 )
2023-10-17 10:57:12 +01:00
2fe24ac5b1
Rework the cuda casting bits. ( #1112 )
2023-10-17 09:44:51 +01:00
00948eb656
Formatting tweak. ( #1111 )
2023-10-16 21:02:53 +01:00
af67672207
Add support for Puffin-Phi-v2. ( #1110 )
...
* Add support for Puffin-Phi-v2.
* Tweak the file name.
* Support the config for puffin-phi-v2.
* Update the readme.
2023-10-16 20:54:21 +01:00