Cannot compile torchtext model
Labels: triaged, oncall: pt2, module: dynamo

### 🐛 Describe the bug

It would be nice to be able to compile torchtext models, e.g. RobertaModel:

```py
import torch

from torchtext.models import RobertaEncoderConf, RobertaModel, RobertaClassificationHead

roberta_encoder_conf = RobertaEncoderConf(vocab_size=250002)
classifier_head = RobertaClassificationHead(num_classes=2, input_dim=768)
classifier = RobertaModel(encoder_conf=roberta_encoder_conf, head=classifier_head)

input = torch.randint(250002, (7,13))

classifier = torch.compile(classifier)

print(classifier(input))
```
Produces
```
Traceback (most recent call last):
  File "/home/awf/dev/pytorch/torch/_dynamo/convert_frame.py", line 398, in _compile
    out_code = transform_code_object(code, transform)
  File "/home/awf/dev/pytorch/torch/_dynamo/bytecode_transformation.py", line 341, in transform_code_object
    transformations(instructions, code_options)
  File "/home/awf/dev/pytorch/torch/_dynamo/convert_frame.py", line 385, in transform
    tracer.run()
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 1686, in run
    super().run()
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 537, in run
    and self.step()
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 500, in step
    getattr(self, inst.opname)(inst)
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 306, in wrapper
    return inner_fn(self, inst)
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 965, in CALL_FUNCTION
    self.call_function(fn, args, {})
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 434, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/home/awf/dev/pytorch/torch/_dynamo/variables/nn_module.py", line 220, in call_function
    return tx.inline_user_function_return(
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 470, in inline_user_function_return
    result = InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 1764, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 1819, in inline_call_
    tracer.run()
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 537, in run
    and self.step()
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 500, in step
    getattr(self, inst.opname)(inst)
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 306, in wrapper
    return inner_fn(self, inst)
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 965, in CALL_FUNCTION
    self.call_function(fn, args, {})
  File "/home/awf/dev/pytorch/torch/_dynamo/symbolic_convert.py", line 434, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/home/awf/dev/pytorch/torch/_dynamo/variables/torch.py", line 446, in call_function
    proxy=tx.output.create_proxy(
  File "/home/awf/dev/pytorch/torch/_dynamo/output_graph.py", line 734, in create_proxy
    rv = super().create_proxy(
  File "/home/awf/dev/pytorch/torch/fx/proxy.py", line 150, in create_proxy
    args_ = self.create_arg(args)
  File "/home/awf/dev/pytorch/torch/fx/_symbolic_trace.py", line 351, in create_arg
    return super().create_arg(a)
  File "/home/awf/dev/pytorch/torch/fx/proxy.py", line 224, in create_arg
    return type(a)(self.create_arg(elem) for elem in a)
  File "/home/awf/dev/pytorch/torch/fx/proxy.py", line 224, in <genexpr>
    return type(a)(self.create_arg(elem) for elem in a)
  File "/home/awf/dev/pytorch/torch/fx/_symbolic_trace.py", line 351, in create_arg
    return super().create_arg(a)
  File "/home/awf/dev/pytorch/torch/fx/proxy.py", line 252, in create_arg
    raise NotImplementedError(f"argument of type: {type(a)}")
NotImplementedError: argument of type: <class 'typing._GenericAlias'>

from user code:
   File "/home/awf/dev/torchtext/torchtext/models/roberta/model.py", line 122, in forward
    features = self.encoder(tokens, masked_tokens)
  File "/home/awf/dev/torchtext/torchtext/models/roberta/model.py", line 70, in forward
    if torch.jit.isinstance(output, List[Tensor]):

Set torch._dynamo.config.verbose=True for more information


You can suppress this exception and fall back to eager by setting:
    torch._dynamo.config.suppress_errors = True


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/awf/dev/gh-awf/fx-tools/dynamo_transformer.py", line 13, in <module>
    print(classifier(input))
  File "/home/awf/dev/pytorch/torch/nn/modules/module.py", line 1482, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/awf/dev/pytorch/torch/_dynamo/eval_frame.py", line 82, in forward
    return self.dynamo_ctx(self._orig_mod.forward)(*args, **kwargs)
  File "/home/awf/dev/pytorch/torch/_dynamo/eval_frame.py", line 211, in _fn
    return fn(*args, **kwargs)
  File "/home/awf/dev/pytorch/torch/_dynamo/eval_frame.py", line 332, in catch_errors
    return callback(frame, cache_size, hooks)
  File "/home/awf/dev/pytorch/torch/_dynamo/convert_frame.py", line 479, in _convert_frame
    result = inner_convert(frame, cache_size, hooks)
  File "/home/awf/dev/pytorch/torch/_dynamo/convert_frame.py", line 103, in _fn
    return fn(*args, **kwargs)
  File "/home/awf/dev/pytorch/torch/_dynamo/utils.py", line 90, in time_wrapper
    r = func(*args, **kwargs)
  File "/home/awf/dev/pytorch/torch/_dynamo/convert_frame.py", line 339, in _convert_frame_assert
    return _compile(
  File "/home/awf/dev/pytorch/torch/_dynamo/convert_frame.py", line 469, in _compile
    raise InternalTorchDynamoError() from e
torch._dynamo.exc.InternalTorchDynamoError
```

### Versions

```
Collecting environment information...
PyTorch version: 2.0.0a0+git5adc18d
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.31

Python version: 3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31
Is CUDA available: False
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA RTX A2000 Laptop GPU
Nvidia driver version: 517.00
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.5
[pip3] torch==2.0.0a0+git5adc18d
[pip3] torchdata==0.6.0a0+ab04b09
[pip3] torchtext==0.15.0a0+c4f1e84
[conda] blas                      1.0                         mkl  
[conda] mkl                       2022.2.1                 pypi_0    pypi
[conda] mkl-include               2022.2.1                 pypi_0    pypi
[conda] mkl-service               2.4.0           py310h7f8727e_0  
[conda] mkl_fft                   1.3.1           py310hd6ae3a3_0  
[conda] mkl_random                1.2.2           py310h00e6091_0  
[conda] numpy                     1.23.5                   pypi_0    pypi
[conda] numpy-base                1.23.4          py310h8e6c178_0  
[conda] torch                     2.0.0a0+git5adc18d           dev_0    <develop>
[conda] torchdata                 0.6.0a0+ab04b09           dev_0    <develop>
[conda] torchtext                 0.15.0a0+c4f1e84           dev_0    <develop>
```


cc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh @mlazos @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @chunyuan-w @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @desertfire