Aller au contenu
Run LLM Locally

Modèle · Meta

Llama 2 7B : VRAM et matériel nécessaires

En Q4_0 avec un contexte de 8K, Llama 2 7B demande environ 8,6 Go : un GPU de 8 Go ou plus le fait tourner entièrement en VRAM.

  • Paramètres6,74B
  • Contexte max4K
  • LicenceLlama 2 Community License

Caractéristiques

Organisation
Meta
Architecture
llama
Sortie
juillet 2023
Couches
32
Dimension cachée
4096
Têtes d'attention
32
Têtes KV
32
Dimension par tête
128
Vocabulaire
32 000
Cache KV pour 1K tokens (f16)
0,5 Go

Spécification officielleDonnées mises à jour il y a 24 joursSource: GGUF header of TheBloke/Llama-2-7B-GGUF (llama-2-7b.Q4_0.gguf) + Hugging Face API (parameter count)

Quantifications et mémoire

Llama 2 7B : mémoire par quantification, contexte 8K
QuantificationTaille du fichierMémoire nécessaireMémoire GPU minimaleQualité
F16Non disponible~18 Go20 GoRéférence (non quantifié)
Q8_0Non disponible~11,8 Go11 GoQuasi sans perte
Q4_0La plus utiliséeNon disponible~8,6 Go8 GoBonne — le choix courant

Tailles de fichier : non disponibles tant qu'elles ne sont pas importées du dépôt du modèle. Mémoire = poids (estimés d'après les bits par poids) + cache KV + surcoût runtime + marge de sécurité. (F16 ≈ 16 bpw, Q8_0 ≈ 8,5 bpw, Q4_0 ≈ 4,64 bpw)

Q4, Q5 ou Q8 : comment choisir sa quantification

Les GPU qui font tourner Llama 2 7B

Llama 2 7B Q4_0 · contexte 8K, un GPU
RTX 509032 Go · 64 Go RAM~6,5 Go · 191–249 tok/s estimationExcellent
RTX 409024 Go · 64 Go RAM~6,5 Go · 135–150 tok/s estimationExcellent
RTX 309024 Go · 64 Go RAM~6,5 Go · 109–135 tok/s estimationExcellent
RX 7900 XTX24 Go · 64 Go RAM~6,6 Go · 90–133 tok/s estimationExcellent
RTX 5060 Ti 16 GB16 Go · 64 Go RAM~6,5 Go · 59–72 tok/s estimationExcellent
RTX 5070 Ti16 Go · 64 Go RAM~6,5 Go · 108–141 tok/s estimationExcellent
RTX 508016 Go · 64 Go RAM~6,5 Go · 139–154 tok/s estimationExcellent
RTX 4060 Ti 16 GB16 Go · 64 Go RAM~6,5 Go · 20–68 tok/s estimationExcellent
RTX 4070 Ti SUPER16 Go · 64 Go RAM~6,5 Go · 95–116 tok/s estimationExcellent
RX 9070 XT16 Go · 64 Go RAM~6,6 Go · 67–110 tok/s estimationExcellent
RTX 3060 12 GB12 Go · 64 Go RAM~6,5 Go · 56–62 tok/s estimationExcellent
RTX 407012 Go · 64 Go RAM~6,5 Go · 35–120 tok/s estimationExcellent
RTX 507012 Go · 64 Go RAM~6,5 Go · 47–160 tok/s estimationExcellent
RTX 40608 Go · 64 Go RAM~6,5 Go · 19–65 tok/s estimationCompatible

Les Mac qui font tourner Llama 2 7B

Llama 2 7B Q4_0 · contexte 8K
M3 Ultra (80-core GPU) · 512 GoMac Studio~6,3 Go · 81–152 tok/s estimationExcellent
M4 Max (40-core GPU) · 128 GoMacBook Pro 14, MacBook Pro 16~6,3 Go · 59–101 tok/s estimationExcellent
M3 Max (40-core GPU) · 128 GoMacBook Pro 14, MacBook Pro 16~6,3 Go · 46–74 tok/s estimationExcellent
M4 Pro (20-core GPU) · 64 GoMac mini, MacBook Pro 14~6,3 Go · 33–51 tok/s estimationExcellent
M4 Max (32-core GPU) · 36 GoMacBook Pro 14, MacBook Pro 16~6,3 Go · 60–78 tok/s estimationExcellent
M4 · 32 GoMacBook Air, MacBook Pro 14~6,3 Go · 15–22 tok/s estimationExcellent
M5 · 32 GoMacBook Pro 14~6,3 Go · 20–29 tok/s estimationExcellent
M3 · 24 GoMacBook Air, MacBook Pro 14~6,3 Go · 13–19 tok/s estimationExcellent

EstimationDonnées mises à jour il y a 24 joursSource: moteur Run LLM Locally

Les limites en clair

Le cache KV grandit avec le contexte : à 4K, il ajoute environ 2 Go aux poids.

Avec moins de 8 Go de VRAM, choisissez une quantification plus petite ou un modèle plus petit de la même famille.

Où acheter

Les prix et les liens suivent le marché choisi.

GeForce RTX 4060

NVIDIA

CompatibleFait tourner Llama 2 7B Q4_0 entièrement en mémoire

Prix indisponible

Disponibilité inconnue

Voir sur amazon.fr

Lien affilié

Radeon RX 7600 XT

AMD

ExcellentFait tourner Llama 2 7B Q4_0 entièrement en mémoire

Prix indisponible

Disponibilité inconnue

Voir sur amazon.fr

Lien affilié

AMD Ryzen AI Max+ 395

PC à mémoire unifiée

ExcellentFait tourner Llama 2 7B Q4_0 entièrement en mémoire

Prix indisponible

Disponibilité inconnue

Voir sur amazon.fr

Lien affilié

GeForce RTX 5090

Vitesse estimée la plus élevée

ExcellentFait tourner Llama 2 7B Q4_0 entièrement en mémoire

Prix indisponible

Disponibilité inconnue

Voir sur amazon.fr

Lien affilié

Aucune offre importée pour ce marché : le lien ouvre une recherche sur la boutique.

Questions fréquentes

Combien de VRAM faut-il pour Llama 2 7B ?
Environ 8,6 Go en Q4_0 avec un contexte de 8K, cache KV et surcoût compris. En Q8_0, il faut environ 11,8 Go. Un contexte plus long ajoute davantage : environ 2 Go de cache KV à 32K.
Llama 2 7B tourne-t-il sur Mac ?
Oui, sur un Mac dont le GPU peut utiliser au moins 6,3 Go, par exemple M3 24 Go. Par défaut, macOS laisse le GPU utiliser environ deux tiers à trois quarts de la mémoire unifiée.
À quelle vitesse tourne Llama 2 7B ?
Sur une RTX 4090, nous estimons 135–150 tok/s en Q4_0. C'est une estimation fondée sur la bande passante mémoire (confiance moyenne) tant que des benchmarks ne sont pas importés.