Commit Graph

57 Commits

Author SHA1 Message Date
Abdulrhman Alkhodiry
33b2944298
Update dependencies and fix convert_model (#458)
* feat: Update dependencies in Cargo.toml

Update the dependencies in Cargo.toml to their latest versions:
- rust_tokenizers: 8.1.1
- tch: 0.16.0 (with features = ["download-libtorch"])
- serde_json: 1
- serde: 1 (with features = ["derive"])
- ordered-float: 4.2.0
- uuid: 1 (with features = ["v4"])
- thiserror: 1
- half: 2
- regex: 1.6
- cached-path: 0.6 (with default-features = false and optional = true)
- dirs: 5 (optional = true)
- lazy_static: 1 (optional = true)
- ort: 1.16.3 (optional = true, default-features = false, features = ["half"])
- ndarray: 0.15 (optional = true)
- tokenizers: 0.19.1 (optional = true, default-features = false, features = ["onig"])

```

* chore: Update .gitignore and requirements.txt, and improve convert_model.py

Update .gitignore to exclude the /models/ and /.venv/ directories, and the convert_model.log file.

Remove the requirements.txt file.

In convert_model.py:
- Add a new function, `zipfile_factory`, to handle zip file creation.
- Update the logger configuration to log debug messages to a file named `convert_model.log`.

* delete duplicate requirements file

* update CI req file path

* missing requests dependency

---------

Co-authored-by: Abdulrhman Alkhodiry <aalkhodiry@jahez.net>
Co-authored-by: Guillaume Becquin <guillaume.becquin@gmail.com>
2024-06-30 08:41:10 +01:00
guillaume-be
107fb214d9
Support wildcard for source files in convert utilities (#399)
* Support wildcard for source files

* - Support offloading at end of every file for conversion
2023-07-02 08:36:21 +01:00
guillaume-be
a74d023583
Add bfloat16 tensor loading support (#396) 2023-06-25 09:21:52 +01:00
Joseph Hajduk
2bff63b2ee
updated tch-rs to 0.13.0 (#380)
* updated tch-rs to 0.13.0
find replaced of_slice to from_slice as per
008fff6cc0/CHANGELOG.md

* fixed formatting

* Add download feature and update CI

* add build script, update CI

* updated chanelog, readme, convert script

* fixed wrong position for build script

* added libtorch download to dependencies download test script

* args reordering

---------

Co-authored-by: josephhajduk <joseph@solidys.dev>
Co-authored-by: Guillaume Becquin <guillaume.becquin@gmail.com>
2023-05-21 18:41:18 +01:00
Panakotta00
431c3ef11b
convert_model.py add support for multiple binary files (#347) 2023-04-06 21:32:51 +01:00
Romain Leroux
c448862185
Add GPT-J support (#285) (#288)
* Add GPT-J support (#285)

* Improve GPT-J implementation

* Improve GPT-J tests

* Adapt GPT-J to latest master branch

* Specify how to convert GPT-J weights instead of providing them
2023-02-15 19:10:47 +00:00
guillaume-be
d7e9c03694
Long t5 implementation (#333)
* LongT5 config implementation

* LongT5 WiP: utility functions 1

* LongT5 WiP: utility functions (2)

* LongT5 WiP: utility functions (3)

* LongT5 WiP: utility functions (4)

* made T5 FF activations generic, expose T5 modules to crate

* Longt% local attention WIP

* LongT5 local attention

* LongT5 global attention WIP

* LongT5 global attention

* LongT5 attention modules (WIP)

* align LongT5 position bias with T5

* Addition of LongT5Block

* LongT5Stack WiP

* LongT5Stack implementation

* LongT5Model implementation

* LongT5ForConditionalGeneration implementation

* Addition of LongT5Generator, inclusion in pipelines

* LongT5 attention fixes

* Fix MIN/MAX dtype computation, mask for longt5

* Updated min/max and infinity computation across models

* GlobalTransient attention fixes

* Updated changelog, readme, tests, clippy
2023-02-12 16:18:20 +00:00
Romain Leroux
4d8a298586
Add sbert implementation for inference (#250)
* Add sbert implementation for inference

* Fix clippy warnings

* Refactor sentence embeddings into a dedicated pipeline

* Add output_attentions and output_hidden_states to T5Config

* Add sbert implementation for inference

* Fix clippy warnings

* Refactor sentence embeddings into a dedicated pipeline

* Add output_attentions and output_hidden_states to T5Config

* Improve sentence_embeddings implementation

* Dedicated tokenizer config for strip_accents and add_prefix_space

* Rename forward to encode_as_tensor

* Remove _conf from Dense layer

* Add sentence embeddings docs

* Addition of remote resources and tests update

* Merge feature branch and fix doctests

* Add SentenceEmbeddingsBuilder<Remote> and improve remote resources

* Use tch::no_grad in sentence embeddings

* Updated changelog, registration of sentence embeddings integration tests

Co-authored-by: Guillaume Becquin <guillaume.becquin@gmail.com>
2022-06-21 20:24:09 +01:00
Guillaume Becquin
60591c0644 Updated DeBERTa configuration parsing 2021-11-28 12:43:35 +01:00
guillaume-be
4282d7b5c4
Reuse gpt2 embeddings (#160)
* Updated GPT2 to re-use embeddings for LM head

* Updated conversion utilities

* Updated changelog
2021-06-12 11:11:34 +02:00
Guillaume B
b6db7cacfb MBart validation, weights updated 2021-06-05 11:47:56 +02:00
guillaume-be
29dae0848b
Clean-up python model conversion utilities (#148)
* Cleaned-up dependency conversion (now relies on model hub repositories)

* Updated dependencies

* Added requests dependency
2021-05-12 16:47:14 +02:00
guillaume-be
14d41860d5
Updated readme and documentation (#147)
* Addition of collapsible sections in README

* Addition of setup section in Readme

* Updated documentation

* Reverted requirements update

* Updated download script for DistilBERT
2021-05-11 22:00:51 +02:00
Guillaume B
05295068b8 Updated README (addition of benchmarks and file conversion) 2021-02-02 17:51:39 +01:00
Guillaume B
f8ed5079c1 initial commit for ProphetNet 2021-01-07 10:41:50 +01:00
Guillaume B
dca5252f38 Addition of generic conversion script 2020-12-04 16:35:13 +01:00
Guillaume B
4e65a553ec Addition of reformer download script 2020-10-31 14:14:52 +01:00
Guillaume B
7db7b2b34c updated weights shape 2020-09-18 17:12:07 +02:00
Guillaume B
6f907ff995 Merge branch 'master' of https://github.com/guillaume-be/rust-bert into xlnet_implementation 2020-09-16 17:19:22 +02:00
guillaume-be
882ec1744b Updated clippy settings and bart download script 2020-09-14 06:48:20 +02:00
Guillaume B
11f7387b4d Addition of download script for XLNet base 2020-09-08 16:16:57 +02:00
Guillaume B
d7ecff4ad3 Addition of MNLI BART model, fix sequence classification 2020-08-29 12:30:14 +02:00
Guillaume B
de7755ca3f Updated download script 2020-08-29 10:49:21 +02:00
Guillaume B
65135227cf Updated dependencies download script for transformers>=2.10 2020-07-20 19:30:19 +02:00
Guillaume B
e6938e1dcb Addition of BERT option for QA 2020-07-08 21:59:31 +02:00
Guillaume B
1e865ef6eb Addition of T5_BASE dependency and download script 2020-07-07 18:15:15 +02:00
Guillaume B
8e7696ff27 T5 dependencies download and configuration setup 2020-06-30 19:11:40 +02:00
Guillaume B
9081bc3318 Initial single turn conversation 2020-06-25 19:32:36 +02:00
Guillaume B
30528ca973 Download DialoGPT dependencies 2020-06-24 19:17:05 +02:00
Guillaume B
f4afd35ed6 albert config implementation, download scripts 2020-06-16 19:07:37 +02:00
Guillaume B
222ef86784 Examples clean-up 2020-06-11 09:45:44 +02:00
Guillaume B
ff0277925e Creation of translation pipeline, added documentation, created unit tests 2020-05-25 16:20:23 +02:00
Guillaume B
cccad54194 Updates to BART for Marian compatibility 2020-05-24 17:00:04 +02:00
Guillaume B
2b498bb10a Creation of MarianGenerator 2020-05-24 15:39:17 +02:00
Guillaume B
029d4bd47c Addition of Electra resources 2020-05-03 10:05:32 +02:00
Guillaume B
5a1c1ae7a0 Addition of ElectraDiscriminator 2020-05-03 09:46:59 +02:00
Guillaume B
1c1f91bcdf Merge remote-tracking branch 'remotes/origin/master' into electra_implementation 2020-05-02 13:58:27 +02:00
Guillaume B
75ed1f864b Updated resources to use cloudfront endpoints 2020-05-02 10:04:02 +02:00
Guillaume B
259d30f58d Added possibility to define cache directory 2020-05-02 09:07:43 +02:00
Guillaume B
4334fa1758 Addition of ElectraForMaskedLM 2020-05-01 08:47:52 +02:00
Guillaume B
b2308d741d Addition of Electra Config and Embeddings 2020-04-28 18:51:04 +02:00
Guillaume B
c65943ab2f Updated model weight download 2020-04-24 17:04:28 +02:00
guillaume-be
03f642fc68
Shared embeddings for BART (#18) 2020-04-05 15:29:19 +02:00
Guillaume B
642874b22b BartModel implemented and weights loaded 2020-04-02 11:16:50 +02:00
Guillaume B
efd2ed0509 BART config & initial input preparation 2020-03-29 12:01:13 +02:00
Guillaume B
c98b689297 GPT2 download 2020-03-08 17:50:57 +01:00
Guillaume B
d820ea8eea End-to-end OpenAI GPT model implemented 2020-03-01 11:26:34 +01:00
Guillaume B
ad1dbfcbc2 Initial commit for GPT model 2020-03-01 10:59:48 +01:00
Guillaume B
b0e84fc2b9 initial commit for GPT2 2020-02-27 18:55:17 +01:00
Guillaume B
ed82d934e6 Created QaExample and parsing from question and context pair 2020-02-24 16:23:44 +01:00