patrickvonplaten
deff792bb6
add prepare inputs for transfo_xl and xlnet
2019-12-25 23:17:24 +01:00
patrickvonplaten
9398058e19
add easy tensor shape match test
2019-12-25 23:17:24 +01:00
patrickvonplaten
90cda45e9e
add past re-ordering for beam search
2019-12-25 23:17:24 +01:00
patrickvonplaten
6bca56fdb0
check for self.config.mem_len instead of self.mem_len in _do_output_past
2019-12-25 23:17:24 +01:00
patrickvonplaten
365ccd0af2
make if statements cleaner for prepare_inputs_for_generation
2019-12-25 23:17:24 +01:00
patrickvonplaten
d039c679d2
better naming for if statement
2019-12-25 23:17:24 +01:00
patrickvonplaten
7e0c5c731a
changed do_output_past function to check for self.config.output_past instead of self.output_past
2019-12-25 23:17:24 +01:00
patrickvonplaten
eeaa402cd4
rename comments
2019-12-25 23:17:24 +01:00
patrickvonplaten
7bb4271291
remove ipdb debugging statements
2019-12-25 23:17:24 +01:00
patrickvonplaten
267587c258
add and improve comments
2019-12-25 23:17:24 +01:00
patrickvonplaten
d891fd0ae0
add past hidden key states for more efficient language generation & add prepare_inputs for gpt2 and ctrl model
2019-12-25 23:17:24 +01:00
Thomas Wolf
aeef4823ab
Merge pull request #2303 from patrickvonplaten/fix_error_with_repetition_penalty
...
fix repetition penalty error in modeling_utils.py
2019-12-25 22:39:20 +01:00
James Noeckel
e1844d9a45
use positional arguments due to inconsistent API
2019-12-25 01:34:02 -08:00
James Noeckel
9fb7addd4d
revert erroneous fix
2019-12-24 22:26:09 -08:00
patrickvonplaten
18e5bdbec5
fix repetition penalty error in modeling_utils.py
2019-12-24 17:18:05 +01:00
Aymeric Augustin
4c09a96096
Simplify re-raising exceptions.
...
Most module use the simpler `raise` version. Normalize those that don't.
2019-12-23 21:20:54 +01:00
James Noeckel
398bb03f98
fix out-of-place call to scatter, whose named argument name is source, not src
2019-12-22 23:30:52 -08:00
Aymeric Augustin
c824d15aa1
Remove __future__ imports.
2019-12-22 17:47:54 +01:00
Aymeric Augustin
6be7cdda66
Move source code inside a src subdirectory.
...
This prevents transformers from being importable simply because the CWD
is the root of the git repository, while not being importable from other
directories. That led to inconsistent behavior, especially in examples.
Once you fetch this commit, in your dev environment, you must run:
$ pip uninstall transformers
$ pip install -e .
2019-12-22 14:15:13 +01:00