Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/examples
/ setup_model
Function
setup_model
distributed/FSDP/utils/train_utils.py:99–102 ·
view source on GitHub ↗
(model_name)
Source
from the content-addressed store, hash-verified
97
98
99
def
setup_model(model_name):
100
model = T5ForConditionalGeneration.from_pretrained(model_name)
101
tokenizer = T5Tokenizer.from_pretrained(model_name, legacy=False)
102
return
model, tokenizer
Callers
1
fsdp_main
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected