Is there any Pytorch tutorial official about LLM?

Doan_Bui: <p>Hello, I’m new to Pytorch.</p>
<p>LLM and generation are hot topics recently. I tried looking for official tutorials, examples of LLM, LoRA, GPT… on the Pytorch homepage but there was nothing.<br>
The Pytorch blog has updated information about LLM but it is a ‘blog’:</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://pytorch.org/blog/pytorch-compile-to-speed-up-inference/">
  <header class="source">
      <img src="https://pytorch.org/favicon.ico?" class="site-icon" width="32" height="32">

      <a href="https://pytorch.org/blog/pytorch-compile-to-speed-up-inference/" target="_blank" rel="noopener nofollow ugc">PyTorch</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/362;"><img src="https://pytorch.org/assets/images/social-share.jpg" class="thumbnail" width="690" height="362"></div>

<h3><a href="https://pytorch.org/blog/pytorch-compile-to-speed-up-inference/" target="_blank" rel="noopener nofollow ugc">PyTorch compile to speed up inference on Llama 2</a></h3>

  <p>In this blog, we discuss how to improve the inference latencies of the Llama 2 family of models using  PyTorch native optimizations such as native fast kernels, compile transformations from torch compile, and tensor parallel for distributed...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Perhaps I was flawed in my search for information.<br>
Do you have any official documents or plans for LLM and generative?</p>
<p>Thank you very much.</p>

eqy: <p>For a lucid, minimal example I would recommend checking out nanoGPT: <a href="https://github.com/karpathy/nanoGPT" class="inline-onebox" rel="noopener nofollow ugc">GitHub - karpathy/nanoGPT: The simplest, fastest repository for training/finetuning medium-sized GPTs.</a></p>

J_Johnson: <p>LLMs are generally handled by another library built on PyTorch called Hugging Face. You can access tutorials here:</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://huggingface.co/learn/nlp-course/chapter1/1">
  <header class="source">

      <a href="https://huggingface.co/learn/nlp-course/chapter1/1" target="_blank" rel="noopener nofollow ugc">huggingface.co</a>
  </header>

  <article class="onebox-body">
    <img width="" height="" src="https://huggingface.co/front/thumbnails/learn/nlp-course.png" class="thumbnail">

<h3><a href="https://huggingface.co/learn/nlp-course/chapter1/1" target="_blank" rel="noopener nofollow ugc">Introduction - Hugging Face NLP Course</a></h3>

  <p>We’re on a journey to advance and democratize artificial intelligence through open source and open science.</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>


Doan_Bui: <p>Llama 2 is an open source llm developed by meta. Llama is the foundation for the multi-llm model. So I’m looking for this tutorial from pytorch.</p>
<ul>
<li>Information about hardware and requirements.</li>
<li>How to build and train the model?</li>
<li>How to prepare dataset?</li>
<li>How to run inference?<br>
…</li>
</ul>
<p>By the way, thank you so much. I will try with Hugging Face.</p>

J_Johnson: <p>Regarding Llama 2, you can find the model cards here: <a href="https://huggingface.co/meta-llama" class="inline-onebox" rel="noopener nofollow ugc">meta-llama (Meta Llama 2)</a></p>
<p>It comes in various sizes. What you’ll probably want to do is get a pretrained set of weights and finetune a set of LoRA vectors ontop of those. Assuming your use case is in English.</p>
<p>Your GPU size will determine which model want to use.</p>

byjlw: <p>Old thread, new content.<br>
PyTorch recently released <a href="https://github.com/pytorch/torchchat" rel="noopener nofollow ugc">torchchat</a>, which details how to run LLMs using PyTorch. It covers everything you need to get things running e2e on many target devices.</p>