Skip to content

LLThomas/myllm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Motivation

tiny-llm (a course on deploying large language models (LLMs)) is designed for macOS users; it is not very user-friendly for Windows-only users. This repository has been adapted to work with a specific version of PyTorch, making it easier for Windows-only users to use.

tiny-llm (A course on LLM serving) 适合 macos 玩家食用,作为纯 win 党不便于学习。 本仓适配了一个 torch 版本,便于纯 win 党玩耍。

Usage

  1. run inference
  • without kvcache
pdm run main --solution myllm --loader week1 --model qwen2-0.5b --prompt "Give me a short introduction to large language model"
  • with kvcache
pdm run main --solution myllm --loader week2 --model qwen2-0.5b --prompt "Give me a short introduction to large language model"
  • with flash-attn
pdm run main --solution myllm --loader week2 --model qwen2-0.5b --enable-flash-attn --prompt "Give me a short introduction to large language model"
  1. run one test case
pdm run pytest test/test_week_1_day_1.py::test_task_1_simple_attention
  1. run all test cases
pdm run pytest test/test_week_1_day_1.py -x

About

PyTorch version of tiny-llm

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages