Project Icon

Transformers-for-NLP-and-Computer-Vision-3rd-Edition

深入探索Transformers在NLP和计算机视觉中的应用

该书全面介绍Transformers在NLP和计算机视觉领域的应用,探讨大型语言模型架构、预训练和微调技术,以及Hugging Face、OpenAI和Google Vertex AI平台的使用。内容涵盖跨平台链式模型实现、视觉transformers处理,并探索CLIP、DALL-E 3和GPT-4V等前沿技术。此外还讨论模型解释性、tokenizer优化和LLM风险缓解等关键主题,为读者提供Transformers应用的实践指南。

Transformers for Natural Language Processing and Computer Vision: Take Generative AI and LLMs to the next level with Hugging Face, Google Vertex AI, ChatGPT, GPT-4V, and DALL-E 3 3rd Edition

by Denis Rothman

drawing

This repo is continually updated and upgraded.
Last updated: July 22, 2024
Look for 🐬 to explore new bonus notebooks such as Midjourney's API, Google Vertex AI Gemini's API, and boosting the speed of OpenAI GPT models with asynchronous batch API calls!
Look for 🎏 to explore existing notebooks for the latest model or platform releases, such as OpenAI's latest GPT-4o and GPT-4o-mini models.
Look for 🛠 to run existing notebooks with new dependency versions and platform API constraints and tweaks.

🚩If you see anything that doesn't run as expected, raise an issue, and we'll work on it!

Transformers-for-NLP-and-Computer-Vision-3rd-Edition

This is the code repository for Transformers for Natural Language Processing and Computer Vision, published by Packt.

Explore Generative AI and Large Language Models with Hugging Face, ChatGPT, GPT-4V, and DALL-E 3

About the book

Transformers for Natural Language Processing and Computer Vision, Third Edition, explores Large Language Model (LLM) architectures, applications, and various platforms (Hugging Face, OpenAI, and Google Vertex AI) used for Natural Language Processing (NLP) and Computer Vision (CV).

Dive into generative vision transformers and multimodal model architectures and build applications, such as image and video-to-text classifiers. Go further by combining different models and platforms and learning about AI agent replication.

What you will learn

  • Learn how to pretrain and fine-tune LLMs
  • Learn how to work with multiple platforms, such as Hugging Face, OpenAI, and Google Vertex AI
  • Learn about different tokenizers and the best practices for preprocessing language data
  • Implement Retrieval Augmented Generation and rules bases to mitigate hallucinations
  • Visualize transformer model activity for deeper insights using BertViz, LIME, and SHAP
  • Create and implement cross-platform chained models, such as HuggingGPT
  • Go in-depth into vision transformers with CLIP, DALL-E 2, DALL-E 3, and GPT-4V

Table of Contents

Chapters

  1. What Are Transformers?
  2. Getting Started with the Architecture of the Transformer Model
  3. Emergent vs Downstream Tasks: The Unseen Depths of Transformers
  4. Advancements in Translations with Google Trax, Google Translate, and Gemini
  5. Diving into Fine-Tuning through BERT
  6. Pretraining a Transformer from Scratch through RoBERTa
  7. The Generative AI Revolution with ChatGPT
  8. Fine-Tuning OpenAI GPT Models
  9. Shattering the Black Box with Interpretable Tools
  10. Investigating the Role of Tokenizers in Shaping Transformer Models
  11. Leveraging LLM Embeddings as an Alternative to Fine-Tuning
  12. Toward Syntax-Free Semantic Role Labeling with ChatGPT and GPT-4
  13. Summarization with T5 and ChatGPT
  14. Exploring Cutting-Edge LLMs with Vertex AI and PaLM 2
  15. Guarding the Giants: Mitigating Risks in Large Language Models
  16. Beyond Text: Vision Transformers in the Dawn of Revolutionary AI
  17. Transcending the Image-Text Boundary with Stable Diffusion
  18. Hugging Face AutoTrain: Training Vision Models without Coding
  19. On the Road to Functional AGI with HuggingGPT and its Peers
  20. Beyond Human-Designed Prompts with Generative Ideation

Appendix

Appendix: Answers to the Questions

Platforms

You can run the notebooks directly from the table below:

ChapterColabKaggleGradientStudioLab
Part I The Foundations of Transformer Models
Chapter 1: What are Transformers?
  • 🛠O_1_and_Accelerators.ipynb
  • ChatGPT_Plus_writes_and_explains_AI.ipynb
Open In Colab Open In ColabKaggle KaggleGradient GradientOpen In SageMaker Studio Lab Open In SageMaker Studio Lab
Chapter 2: Getting Started with the Architecture of the Transformer Model
  • 🛠Multi_Head_Attention_Sub_Layer.ipynb
  • positional_encoding.ipynb
Open In Colab Open In ColabKaggle KaggleGradient GradientOpen In SageMaker Studio Lab Open In SageMaker Studio Lab
Chapter 3: Emergent vs Downstream Tasks: the Unseen Depths of Transformers
  • From_training_to_emergence.ipynb
  • Transformer_tasks_with_Hugging_Face.ipynb
Open In Colab Open In ColabKaggle KaggleGradient GradientOpen In SageMaker Studio Lab Open In SageMaker Studio Lab
Chapter 4: Advancements in Translations with Google Trax, Google Translate, and Google Bard
  • WMT_translations.ipynb
  • Trax_Google_Translate.ipynb
Open In Colab Open In ColabKaggle KaggleGradient GradientOpen In SageMaker Studio Lab Open In SageMaker Studio Lab
Chapter 5: Diving into Fine-Tuning through BERT
  • BERT_Fine_Tuning_Sentence_Classification_GPU.ipynb
Open In ColabKaggleGradientOpen In SageMaker Studio Lab
Chapter 6: Pretraining a Transformer from Scratch through RoBERTa
  • KantaiBERT.ipynb
  • 🛠 Customer_Support_for_X.ipynb
项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号