Opt in flax and tf (#17388)
* initial commit * add init file * update globakl init * update index and dummy objects * style * update modelling auto * fix initi typo in src/transformers * fix typo in modeling tf auto, opt was in wrong mapping name * fixed a slow test : saved_model * style * fix positionnal embedding if no position id is provided * update tf test * update test flax requirements * fixed serialization * update * update tf name to allow smooth convertion * update flax tests * style * fix test typo * fix tf typo test * add xla for generate support in causal LM * fixed bug * cleaned tf tests * style * removed from PT for slow tests * fix typp * opt test as slow * trying to fix GPT2 undefined * correct documentation and add to test doc * update tf doc * fix doc * fake commit * Apply suggestions from code review Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com> * update test based on review * merged main layer for functionning test * fixup + quality * Apply suggestions from code review Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * update long comment * make fix copies Co-authored-by: Arthur <arthur@huggingface.co> Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
@@ -334,7 +334,7 @@ class OPTGenerationTest(unittest.TestCase):
|
||||
@property
|
||||
def prompts(self):
|
||||
return [
|
||||
"Today is a beautiful day and I want to",
|
||||
"Today is a beautiful day and I want",
|
||||
"In the city of",
|
||||
"Paris is the capital of France and",
|
||||
"Computers and mobile phones have taken",
|
||||
@@ -344,7 +344,7 @@ class OPTGenerationTest(unittest.TestCase):
|
||||
model_id = "facebook/opt-125m"
|
||||
|
||||
EXPECTED_OUTPUTS = [
|
||||
"Today is a beautiful day and I want to thank",
|
||||
"Today is a beautiful day and I want everyone",
|
||||
"In the city of Rome Canaver Canaver Canaver Canaver",
|
||||
"Paris is the capital of France and Parisdylib",
|
||||
"Computers and mobile phones have taken precedence over",
|
||||
@@ -409,7 +409,7 @@ class OPTGenerationTest(unittest.TestCase):
|
||||
model_id = "facebook/opt-350m"
|
||||
|
||||
EXPECTED_OUTPUTS = [
|
||||
"Today is a beautiful day and I want to share",
|
||||
"Today is a beautiful day and I want to",
|
||||
"In the city of San Francisco, the city",
|
||||
"Paris is the capital of France and the capital",
|
||||
"Computers and mobile phones have taken over the",
|
||||
|
||||
Reference in New Issue
Block a user