Skip to content

[Q] Memory Requirements for Different Model Sizes #13

Closed

Description

@NightMachinery
No description provided.

Activity

  1. satyajitghana commented on Mar 11, 2023

    @satyajitghana
    7B (4-bit): 4.14 GB MEM
    65B (4-bit): 38 GB MEM
    
  2. prusnak commented on Mar 11, 2023

    @prusnak
    Contributor

    Since the original models are using FP16 and llama.cpp quantizes to 4-bit, the memory requirements are around 4 times smaller than the original:

    • 7B => ~4 GB
    • 13B => ~8 GB
    • 30B => ~16 GB
    • 65B => ~32 GB
  3. cannin commented on Mar 12, 2023

    @cannin

    With an M1 Max 64GB with 4-bit

    65B: 38.5GB, 850 ms per token
    30B: 19.5GB, 450 ms per token
    13B: 7.8GB, 150 ms per token
    7B: 4.0GB, 75 ms per token

  4. added
    questionFurther information is requested
    documentationImprovements or additions to documentation
    on Mar 12, 2023
  5. dbddv01 commented on Mar 15, 2023

    @dbddv01

    For the record, Intel® Core™ i5-7600K CPU @ 3.80GHz × 4, 16Gb ram, under Ubuntu, model 13B runs with acceptable response time. Note that as mentioned by previous comments, -t 4 parameter gives the best results.
    main: mem per token = 22357508 bytes
    main: load time = 83076.67 ms
    main: sample time = 267.12 ms
    main: predict time = 193441.61 ms / 367.76 ms per token
    main: total time = 277980.41 ms

    Great work !

  6. ggerganov commented on Mar 15, 2023

    @ggerganov
    Member

    Should add these to readme

  7. sinanisler commented on Mar 18, 2023

    @sinanisler

    @prusnak is that pc ram or gpu vram ?

  8. prusnak commented on Mar 18, 2023

    @prusnak
    Contributor

    @prusnak is that pc ram or gpu vram ?

    llama.cpp runs on cpu not gpu, so it's the pc ram

  9. deniaud commented on Mar 18, 2023

    @deniaud

    @prusnak is that pc ram or gpu vram ?

    llama.cpp runs on cpu not gpu, so it's the pc ram

    Is it possible that at some point we will get a video card version?

  10. prusnak commented on Mar 18, 2023

    @prusnak
    Contributor

    Is it possible that at some point we will get a video card version?

    I don' think so. You can use run the original Whisper model on a GPU: https://github.com/openai/whisper

  11. mrpher commented on Mar 18, 2023

    @mrpher

    Fwiw, running on my M2 Macbook Air w 8GB of ram comes to a grinding halt. At first run about 2-3 minutes of completely unresponsive machine (mouse and keyboard locked), then about 10-20 seconds per response word. Didn't expect great response times, but thats a bit slower than anticipated.

    • Edit: using 7B model
  12. prusnak commented on Mar 18, 2023

    @prusnak
    Contributor

    M2 Macbook Air w 8GB

    Close every other app, ideally reboot to clean state. This should help. If you see unresponsive machine, then it is swapping memory to disk. 8GB is not that much, especially if you have Browsers, Slack, etc. running.

  13. j-f1 commented on Mar 18, 2023

    @j-f1
    Contributor

    Also make sure you’re using 4 threads instead of 8 — you don’t want to be using any of the 4 efficiency cores.

  14. mrpher commented on Mar 18, 2023

    @mrpher

    Working well now, good recommendations @prusnak @j-f1 thank you

  15. 112 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions