"git@developer.sourcefind.cn:modelzoo/aprielguard_vllm.git" did not exist on "2854862a86c20b79615742f87f35c5bc4f7755ea"
Unverified Commit d84f34ad authored by Masahiro Suzuki's avatar Masahiro Suzuki Committed by GitHub
Browse files

[T5] Adding `model_parallel = False` to `T5ForTokenClassification` and...

[T5] Adding `model_parallel = False` to `T5ForTokenClassification` and `MT5ForTokenClassification` (#30763)

* Adding model_parallel = False

* Revert "Adding model_parallel = False"

This reverts commit ba1d99976acb598824ce3347dbe7d848daa21e79.

* Trainer: circumvent error for model  in which is_parallelizable is True but does not have model_parallel attribute
parent 9ef38840
...@@ -436,7 +436,7 @@ class Trainer: ...@@ -436,7 +436,7 @@ class Trainer:
"https://huggingface.co/docs/transformers/model_doc/auto" "https://huggingface.co/docs/transformers/model_doc/auto"
) )
if hasattr(model, "is_parallelizable") and model.is_parallelizable and model.model_parallel: if getattr(model, "is_parallelizable", False) and getattr(model, "model_parallel", False):
self.is_model_parallel = True self.is_model_parallel = True
else: else:
self.is_model_parallel = False self.is_model_parallel = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment