Julien Chaumond
cbf8f5d32b
[model upload] Support for organizations
2020-03-09 17:33:57 -04:00
Lysandre Debut
5164ea91a7
Skipping outputs ( #3116 )
...
* Minimal example
* Proposal 2
* Proposal 2 for fast tokenizers
* Typings
* Docs
* Revert "Docs" for easier review
This reverts commit eaf0f97062e809887704a542144c537f769d5223.
* Remove unnecessary assignments
* Tests
* Fix faulty type
* Remove prints
* return_outputs -> model_input_names
* Revert "Revert "Docs" for easier review"
This reverts commit 6fdc69408102bf695797f2dfddbb6350c6b9e722.
* code quality
2020-03-09 13:48:58 -04:00
Patrick von Platen
847d370301
fix typo
2020-03-09 16:18:29 +01:00
Patrick von Platen
3e624c64ca
fix repetition penalty mask in tf
2020-03-09 14:55:11 +01:00
Lysandre Debut
0ae91c80aa
Change back pipeline signatures ( #3105 )
...
* Change back pipeline signatures
* String types for non-imported objects
2020-03-06 17:26:18 -05:00
Sam Shleifer
ed37f9fa4f
[Bart] _prepare_decoder_inputs should use large negative ( #3158 )
2020-03-06 16:06:36 -05:00
Thomas Wolf
0416d437fb
Merge pull request #3148 from patrickvonplaten/refactoring_beam_search_for_tf_2
...
refactored beam search according to torch implementation
2020-03-06 22:01:46 +01:00
Funtowicz Morgan
db9279dedb
Fix QA models binding for Flaubert, XLNet and XLM. ( #3100 )
...
Signed-off-by: Morgan Funtowicz <morgan@huggingface.co >
Format & quality
Signed-off-by: Morgan Funtowicz <morgan@huggingface.co >
Again.
Signed-off-by: Morgan Funtowicz <morgan@huggingface.co >
2020-03-06 13:04:29 -05:00
Sam Shleifer
e58b3ec5df
add imports to examples ( #3160 )
2020-03-06 11:15:33 -05:00
Thomas Wolf
6ffe03a0a1
Merge pull request #3137 from tomhosking/bart-refactor
...
Refactor BartModel so that input checks are handled within enc/dec
2020-03-06 13:06:34 +01:00
Thomas Wolf
3e5da38dae
Merge pull request #3132 from huggingface/hf_api_model_list
...
[hf_api] Get the public list of all the models on huggingface
2020-03-06 13:05:52 +01:00
Thomas Wolf
9499a3778e
Merge pull request #3103 from gthb/keras-serialization
...
Support keras JSON/HDF5 serialization of main layers
2020-03-06 12:59:13 +01:00
patrickvonplaten
9362eb4a07
refactored beam search according to torch implementation
2020-03-06 00:46:29 +01:00
Sam Shleifer
857e0a0d3b
Rename BartForMaskedLM -> BartForConditionalGeneration ( #3114 )
...
* improved documentation
2020-03-05 17:41:18 -05:00
Lysandre Debut
146c521235
Merge branch 'master' into add_models_special_tokens_to_specific_configs
2020-03-05 17:24:42 -05:00
Lysandre Debut
b623ddc000
Pass kwargs to configuration ( #3147 )
...
* Pass kwargs to configuration
* Setter
* test
2020-03-05 17:16:57 -05:00
Lysandre Debut
0001d05686
Correct missing keys + test ( #3143 )
2020-03-05 17:01:54 -05:00
Thomas Wolf
1741d740f2
Merge pull request #3145 from sshleifer/bartfp16
...
[Bart] FP16 Support
2020-03-05 22:14:35 +01:00
sshleifer
14d40584b2
remove newline
2020-03-05 13:06:35 -05:00
sshleifer
1360dacaa3
cleanup deltas
2020-03-05 12:57:42 -05:00
sshleifer
810079de1f
no ipdb
2020-03-05 12:48:14 -05:00
sshleifer
c36fdc88d4
tests pass
2020-03-05 12:33:08 -05:00
Tom Hosking
31acb8dc52
Remove rogue .DS_Store
2020-03-05 13:51:30 +00:00
Tom Hosking
06a6cb6f36
Refactor BartModel so that input checks are handled within BartEncoder and BartDecoder
2020-03-05 13:45:41 +00:00
Patrick von Platen
e33ed12c3b
uncomment expression
2020-03-05 13:41:04 +01:00
Patrick von Platen
4220fd52b9
remove ipdb
2020-03-05 13:36:21 +01:00
Patrick von Platen
c47394b0c9
refactoring and bug fixing beam search generate
2020-03-05 13:12:50 +01:00
Gunnlaugur Thor Briem
4c91a3af94
Document keras_serializable decorator
2020-03-05 11:48:10 +00:00
Gunnlaugur Thor Briem
4be01e5cbf
Use name transformers_config in Keras serialization
...
Be explicit that this is config for the transformers package (as these
layers may coexist with other custom stuff in a Keras model, plus the
Keras container itself is called config, and config["config"] is not
great)
Add explicit error handling for initializer calls that have neither
the `config` nor the `transformers_config` argument, or have both.
2020-03-05 11:47:35 +00:00
Gunnlaugur Thor Briem
a355f4f0fc
Add functools.wraps for wrapper initializer
...
Preserve the original initializer function's metadata. See
https://docs.python.org/3/library/functools.html#functools.update_wrapper
2020-03-05 11:18:50 +00:00
Gunnlaugur Thor Briem
d262a5d48e
fix: remove unused import
2020-03-05 11:05:29 +00:00
Julien Chaumond
3f067f4409
[hf_api] slightly more doc
2020-03-04 23:55:46 -05:00
Julien Chaumond
f564f93c84
[hf_api] Get the public list of all the models on huggingface
2020-03-04 23:33:09 -05:00
Lysandre
07a79db505
Fix failing doc samples
2020-03-04 19:11:31 -05:00
Gunnlaugur Thor Briem
4f338ed407
Explicit config_class instead of module inspection
2020-03-04 23:45:29 +00:00
Gunnlaugur Thor Briem
6fe1cc0874
fix: clean up inadvertent change in tf_t5
...
This was the beginnings of an attempt to address the test failure on
this layer, and instead I backed out of making this layer
keras-serializable at all ... so it was a mistake to commit this.
2020-03-04 23:24:15 +00:00
Thomas Wolf
bdd3d0c76d
Merge pull request #3118 from patrickvonplaten/add_beam_search_to_generation_tf_2_0
...
Add beam search to generation tf 2 0
2020-03-04 23:28:00 +01:00
Thomas Wolf
3b7f95a506
Merge pull request #3115 from gthb/fix-bogus-param-to-layer-init
...
fix: passing config as Layer trainable param
2020-03-04 21:59:09 +01:00
Patrick von Platen
006097f8ad
rename variables named 'word' to 'token' in generate fn ( #3119 )
...
* fix conflits
* fixed naming bug
* make style
2020-03-04 12:01:17 -05:00
Gunnlaugur Thor Briem
18f4b9274f
fix: work with Tensorflow < 2.1.0
...
tf.keras.utils.register_keras_serializable was added in TF 2.1.0, so
don't rely on it being there; just decorate the class with it if it
exists.
2020-03-04 16:57:29 +00:00
Patrick von Platen
7a89a3e493
correct beam search sampling
2020-03-04 17:27:47 +01:00
Patrick von Platen
c4c4c9998a
make GPT2 and CTRL shape consistent between torch and TF
2020-03-04 17:27:47 +01:00
patrickvonplaten
2529b2d37e
set redorder past sort dimension to its default
2020-03-04 17:27:47 +01:00
patrickvonplaten
61fef6e957
added beam_search generation for tf 2.0
2020-03-04 17:27:47 +01:00
Patrick von Platen
6701fb7859
fix beam_search behavior when sampling ( #3106 )
...
* fix beam_search behavior when sampling
* delete print
* make correct style
2020-03-04 09:30:51 -05:00
Gunnlaugur Thor Briem
b1116fd673
fix: passing config as Layer trainable param
...
Lurking bugs discovered while working on other stuff.
2020-03-03 23:05:40 +00:00
Gunnlaugur Thor Briem
96c4990165
fix unused imports and style
2020-03-03 22:57:05 +00:00
Gunnlaugur Thor Briem
470753bcf5
Put @keras_serializable only on layers it works on
...
And only run the test on TF*MainLayer classes so marked.
2020-03-03 22:44:45 +00:00
Gunnlaugur Thor Briem
0c716ede8c
Use class decorator instead of superclass
...
When supplied by Keras deserialization, the config parameter to initializers
will be a dict. So intercept it and convert to PretrainedConfig object (and
store in instance attribute for get_config to get at it) before passing to the
actual initializer. To accomplish this, and repeat as little code as possible,
use a class decorator on TF*MainLayer classes.
2020-03-03 22:31:42 +00:00
Sam Shleifer
e9e6efdc45
BartForSequenceClassification: fix num_labels, add test ( #3110 )
2020-03-03 15:54:29 -05:00