MCPcopy Index your code
hub / github.com/pytorch/examples

github.com/pytorch/examples @main sqlite

repository ↗ · DeepWiki ↗
568 symbols 1,728 edges 93 files 110 documented · 19% 1 cross-repo links
README

PyTorch Examples

https://pytorch.org/examples/

pytorch/examples is a repository showcasing examples of using PyTorch. The goal is to have curated, short, few/no dependencies high quality examples that are substantially different from each other that can be emulated in your existing work.

  • For tutorials: https://github.com/pytorch/tutorials
  • For changes to pytorch.org: https://github.com/pytorch/pytorch.github.io
  • For a general model hub: https://pytorch.org/hub/ or https://huggingface.co/models
  • For recipes on how to run PyTorch in production: https://github.com/facebookresearch/recipes
  • For general Q&A and support: https://discuss.pytorch.org/

Available models

Additionally, a list of good examples hosted in their own repositories:

Contributing

If you'd like to contribute your own example or fix a bug please make sure to take a look at CONTRIBUTING.md.

Core symbols most depended-on inside this repo

save
called by 30
distributed/FSDP2/checkpoint.py
update
called by 22
imagenet/main.py
rank_log
called by 14
distributed/tensor_parallelism/log_utils.py
train
called by 14
mnist_forward_forward/main.py
reset
called by 10
imagenet/main.py
reset_parameters
called by 10
distributed/FSDP2/model.py
timed_log
called by 7
distributed/rpc/batch/parameter_server.py
trace
called by 6
fx/profiling_tracer.py

Shape

Method 266
Function 194
Class 108

Languages

Python100%

Modules by API surface

distributed/tensor_parallelism/llama2_model.py27 symbols
imagenet/main.py20 symbols
distributed/rpc/parameter_server/rpc_parameter_server.py19 symbols
distributed/minGPT-ddp/mingpt/model.py19 symbols
distributed/rpc/pipeline/main.py18 symbols
distributed/FSDP2/model.py17 symbols
distributed/rpc/rl/main.py16 symbols
word_language_model/model.py13 symbols
siamese_network/main.py13 symbols
distributed/rpc/rnn/rnn.py13 symbols
distributed/rpc/batch/reinforce.py13 symbols
fast_neural_style/neural_style/transformer_net.py12 symbols

Dependencies from manifests, versioned

sphinx5.3.0 · 1×
torch2.6 · 1×
torchdata0.9.0 · 1×
torchvision0.20.0 · 1×

For agents

$ claude mcp add examples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact