PyTorch-Tutorial-2nd: three parts, a non-commercial licence, and one tagged release
PyTorch in Practice (2nd Edition): from zero-to-beginner basics to CV, NLP and LLM project applications, through to advanced engineering deployment. With this book, readers can master PyTorch and become skilled deep learning engineers.
At a glance
- What is it?
- The second edition of this Chinese PyTorch book is organised as three parts, fundamentals, industry applications and deployment, with the free online text and the free companion code in the same repository. Two details decide whether it fits you before any content does: the licence is Creative Commons BY-NC 4.0, and the release list has exactly one tag from May 2024.
- Who is it for?
- Read PyTorch-Tutorial-2nd if you want one Chinese path from PyTorch basics through computer vision, NLP and LLM work to deployment with ONNX and TensorRT, and if a personal, non-commercial licence is acceptable. Do not reuse its text or images in a commercial product without checking, because BY-NC 4.0 forbids that outright.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- TingsongYu/PyTorch-Tutorial-2nd4,636 ★ · +42
| Repository | 2026-09-10 | 2026-11-15 |
|---|---|---|
| TingsongYu/PyTorch-Tutorial-2nd | 4.6k | 4.6k |
42 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Three parts, and the order is the argument
The book states its own structure as a sentence you can map onto the table of contents: basic concepts as the foundation, computer vision, natural language processing and large language models as the core, and inference deployment frameworks as the bridge, all aimed at project work and theory together. That becomes three parts. The upper part is entry, the middle part is application, the lower part is landing on production. The framing is deliberate: the reader is taken from framework to applications to deployment rather than shown a topic list, and the last part exists because the book treats deploying a model as the step where a project becomes usable.
Part one ends by having you build your own code layout
The fundamentals part is written for people who have just started, did not study computer science, or are undergraduates, and it covers an introduction to PyTorch, how to set up a development environment, and the core modules for data, models, optimization and visualization. The last item is the one that separates a tutorial from a course: once the core modules are explained, you build your own code structure with what you have learned, which is presented as the foundation for everything in the middle part. So the book does not stop at running an example. It asks you to leave part one with a layout you designed, and it is that layout the application chapters then build on.
The application part is a task census, and it is counted
The middle part covers three subjects, and the computer vision chapter names eight tasks: image classification, image segmentation, object detection, object tracking, GAN generation, diffusion generation, image captioning and image retrieval. The natural language processing chapter names five models in detail, RNN, LSTM, Transformer, BERT and GPT, against five tasks: text classification, machine translation, named entity recognition, question answering and article generation. The counting is the useful signal. A chapter that names eight vision tasks and five NLP tasks is telling you how much breadth to expect, and breadth is the trade: wide coverage of standard tasks rather than depth in one of them.
The LLM chapter names four Chinese open models
The large language model chapter is described as four deployments with code analysis plus one industry application, GPT Academic, and the models it works through are the four mainstream open source ones from China: Qwen, ChatGLM, Baichuan and Yi. That is a dated and specific list, and it is the chapter most likely to need rechecking, since a fast moving model field makes any fixed shortlist age quickly. What the chapter claims to deliver is deployment and code analysis rather than a survey, so the value is in seeing how each model's interface and serving path are handled, not in the models themselves.
Part three is quantization, and PTQ against QAT is the lesson
The deployment part starts from a premise worth stating plainly: the common route is to take a model out of a training framework such as PyTorch in order to deploy, accelerate and quantize it. The tools named are ONNX and TensorRT, with their principles and their use, and TensorRT is then used to dig into the concept of model quantization, including hands-on practice and reasoning for PTQ and QAT, post-training quantization and quantization-aware training. The distinction is the part that transfers to other stacks: one quantizes a model after training and the other bakes the idea into training, and the trade is accuracy against effort.
CC BY-NC 4.0 is the licence that decides your use
The licence section says the work is licensed under Creative Commons Attribution-NonCommercial 4.0 International. The repository itself records no licence metadata, so that README statement is the one to rely on, and the two words that matter are Attribution and NonCommercial. Attribution means the credit notice travels with any reuse. NonCommercial means you may not use it commercially, which puts it outside the OSI definition of an open source licence even though the README elsewhere describes the online reading and the companion code as open source and free. That wording, free and open source, sits next to a licence that forbids commercial use, and if your use case has a company behind it, that is the line to read twice.
The hiatus log is still in the README
The appendix keeps a struck-through table of pauses in the writing, three entries with dates and stated reasons: a work project that was a headache in early 2022, then more projects and more new people from July 2022 into early 2023, then a personal reason in mid 2023. It is an unusual thing to keep and a useful thing to keep, because it tells you the cadence a reader can expect. Elsewhere the README asks for stars, notes that the project is listed by the HelloGitHub community, and shows a star history image generated by `scripts/gen_star_history.py` and refreshed by GitHub Actions every seven days. The community section lists four QQ groups as full and a fifth group, number 1021300804, as open, with the join password found by reading code linked from the first edition's repository.
Editorial conclusion
Read PyTorch-Tutorial-2nd if you want one Chinese path from PyTorch basics through computer vision, NLP and LLM work to deployment with ONNX and TensorRT, and if a personal, non-commercial licence is acceptable. Do not reuse its text or images in a commercial product without checking, because BY-NC 4.0 forbids that outright. Verify first where the code lives, since the repository holds `code/`, `asset/` and `scripts/` rather than the book itself, and note the mismatch between the single 2024 release tag and the pushes recorded as recent as 2026-11-01.
Frequently asked questions
What is PyTorch-Tutorial-2nd?
The second edition of a Chinese practical PyTorch book, published as a free online read with free companion code. It is organised in three parts: fundamentals for beginners, industry applications covering computer vision, NLP and large language models, and industrial deployment.
Which computer vision tasks does PyTorch-Tutorial-2nd cover?
Eight tasks: image classification, image segmentation, object detection, object tracking, GAN generation, diffusion generation, image captioning and image retrieval.
Which NLP and LLM topics are in PyTorch-Tutorial-2nd?
The NLP chapter covers RNN, LSTM, Transformer, BERT and GPT across five tasks: text classification, machine translation, named entity recognition, question answering and article generation. The LLM chapter covers four Chinese open source models, Qwen, ChatGLM, Baichuan and Yi, plus the GPT Academic application.
What does the deployment part of PyTorch-Tutorial-2nd teach?
How to take a model out of the PyTorch training framework to deploy, accelerate and quantize it, using ONNX and TensorRT, with post-training quantization and quantization-aware training covered in principle and in practice.
Can I use PyTorch-Tutorial-2nd commercially?
Not under its stated licence. The work is licensed under Creative Commons Attribution-NonCommercial 4.0 International, which permits reuse with attribution but forbids commercial use, while the repository records no licence metadata of its own.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/tingsongyu-pytorch-tutorial-2nd)Star history chart for your README
[](https://hysenlabs.com/projects/tingsongyu-pytorch-tutorial-2nd)Was this useful?