pytorch / torchchat

Run PyTorch LLMs locally on servers, desktop and mobile
BSD 3-Clause "New" or "Revised" License
3.31k stars 212 forks source link

Clear model download documents #1222

Closed HamidShojanazeri closed 2 weeks ago

HamidShojanazeri commented 3 weeks ago

🐛 Describe the bug

From the README, its not very clear how to download different flavor/sizes of the models from HF, unless someone go to the next section and find the inventory list https://github.com/pytorch/torchchat#download-weights might be helpful to add the inventory list command upper before the the download command.

Also as we have 3.2 it would be great to update the docs.


/torchchat$ python3 torchchat.py list

Model                                        Aliases                                                    Downloaded 
-------------------------------------------- ---------------------------------------------------------- -----------
meta-llama/llama-2-7b-hf                     llama2-base, llama2-7b                                                
meta-llama/llama-2-7b-chat-hf                llama2, llama2-chat, llama2-7b-chat                                   
meta-llama/llama-2-13b-chat-hf               llama2-13b-chat                                                       
meta-llama/llama-2-70b-chat-hf               llama2-70b-chat                                                       
meta-llama/meta-llama-3-8b                   llama3-base                                                           
meta-llama/meta-llama-3-8b-instruct          llama3, llama3-chat, llama3-instruct                       Yes        
meta-llama/meta-llama-3-70b-instruct         llama3-70b                                                            
meta-llama/meta-llama-3.1-8b                 llama3.1-base                                                         
meta-llama/meta-llama-3.1-8b-instruct        llama3.1, llama3.1-chat, llama3.1-instruct                            
meta-llama/meta-llama-3.1-70b-instruct       llama3.1-70b                                                          
meta-llama/meta-llama-3.1-8b-instruct-tune   llama3.1-tune, llama3.1-chat-tune, llama3.1-instruct-tune             
meta-llama/meta-llama-3.1-70b-instruct-tune  llama3.1-70b-tune                                                     
meta-llama/meta-llama-3.2-1b                 llama3.2-1b-base                                                      
meta-llama/meta-llama-3.2-1b-instruct        llama3.2-1b, llama3.2-1b-chat, llama3.2-1b-instruct                   
meta-llama/llama-guard-3-1b                  llama3-1b-guard, llama3.2-1b-guard                                    
meta-llama/meta-llama-3.2-3b                 llama3.2-3b-base                                                      
meta-llama/meta-llama-3.2-3b-instruct        llama3.2-3b, llama3.2-3b-chat, llama3.2-3b-instruct                   
meta-llama/llama-3.2-11b-vision              llama3.2-11B-base, Llama-3.2-11B-Vision-base                          
meta-llama/llama-3.2-11b-vision-instruct     llama3.2-11B, Llama-3.2-11B-Vision, Llama-3.2-mm                      
meta-llama/codellama-7b-python-hf            codellama, codellama-7b                                               
meta-llama/codellama-34b-python-hf           codellama-34b                                                         
mistralai/mistral-7b-v0.1                    mistral-7b-v01-base                                                   
mistralai/mistral-7b-instruct-v0.1           mistral-7b-v01-instruct                                               
mistralai/mistral-7b-instruct-v0.2           mistral, mistral-7b, mistral-7b-instruct                              
openlm-research/open_llama_7b                open-llama, open-llama-7b                                             
stories15m                                                                                                         
stories42m                                                                                                         
stories110m                                                                                                        

Versions

Collecting environment information...
PyTorch version: 2.5.0.dev20240901+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Clang version: Could not collect
CMake version: version 3.30.3
Libc version: glibc-2.31

Python version: 3.10.14 (main, May  6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-1068-aws-x86_64-with-glibc2.31
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Byte Order:                           Little Endian
Address sizes:                        46 bits physical, 48 bits virtual
CPU(s):                               16
On-line CPU(s) list:                  0-15
Thread(s) per core:                   2
Core(s) per socket:                   8
Socket(s):                            1
NUMA node(s):                         1
Vendor ID:                            GenuineIntel
CPU family:                           6
Model:                                143
Model name:                           Intel(R) Xeon(R) Platinum 8488C
Stepping:                             8
CPU MHz:                              2400.000
BogoMIPS:                             4800.00
Hypervisor vendor:                    KVM
Virtualization type:                  full
L1d cache:                            384 KiB
L1i cache:                            256 KiB
L2 cache:                             16 MiB
L3 cache:                             105 MiB
NUMA node0 CPU(s):                    0-15
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd ida arat avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid cldemote movdiri movdir64b md_clear serialize amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] pytorch-triton==3.0.0+dedb7bdf33
[pip3] torch==2.5.0.dev20240901+cu121
[pip3] torchao==0.5.0
[pip3] torchtune==0.0.0
[pip3] torchvision==0.20.0.dev20240901+cu121
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] pytorch-triton            3.0.0+dedb7bdf33          pypi_0    pypi
[conda] torch                     2.5.0.dev20240901+cu121          pypi_0    pypi
[conda] torchao                   0.5.0                    pypi_0    pypi
[conda] torchtune                 0.0.0                    pypi_0    pypi
[conda] torchvision               0.20.0.dev20240901+cu121          pypi_0    pypi
Jack-Khuu commented 3 weeks ago

different flavor/sized of the models from HF

Can you provide some examples? That said it would be good idea for us to link to the model list earlier: https://github.com/pytorch/torchchat?tab=readme-ov-file#models

image

Jack-Khuu commented 3 weeks ago

As for 3.2 that's a good idea, it'll be faster for demos than running it on the 8B

HamidShojanazeri commented 3 weeks ago

different flavor/sized of the models from HF

Can you provide some examples? That said it would be good idea for us to link to the model list earlier: pytorch/torchchat#models

image

sure, docs are showing the following

python3 torchchat.py download llama3.1

then the section after to list the inventory and Aliases, potentially adding that section or just the command before the download command may help the clarity. Maybe something like

Find the model inventory using the the command below

python3 torchchat.py list

Download the model using

python3 torchchat.py download llama3.1
Jack-Khuu commented 2 weeks ago

Updated the README to upsell model list

Thanks again @HamidShojanazeri !