Swift MLX Chat with Local LLM macOS Application Short Demo | Mistral | LLaMA | SwiftUI

Sdílet
Vložit
  • čas přidán 22. 02. 2024
  • This is a demonstration video of a macOS Application that utilizes Apple MLX Framework to chat local LLM Models such as Mistral & Code LLaMA #mlx #llm
    Check the GitHub Project repository
    github.com/alfianlosari/mlx-s...
  • Věda a technologie

Komentáře • 24

  • @XCA
    @XCA  Před 3 měsíci

    Source code on GitHub Project Repository:
    github.com/alfianlosari/mlx-swift-examples

  • @user-th8rb5gz3p
    @user-th8rb5gz3p Před 2 měsíci

    Thank you so much for your hard work, you are as always one of the first to show new technology.

  • @seshakiran
    @seshakiran Před 3 měsíci

    This is awesome! Thanks for sharing the swift implementation. Just had Gemma run on Mac using MLX. Thanks to you all :)

  • @AndrejKarpathy
    @AndrejKarpathy Před 3 měsíci +4

    nice :D

    • @AndrejKarpathy
      @AndrejKarpathy Před 3 měsíci +2

      (I have not written Mac OS apps before, would love to learn how to create LLM apps and looking forward to the video)

    • @seshakiran
      @seshakiran Před 3 měsíci

      @@AndrejKarpathy your humble nature of not only teaching the best and looking forward to learn from all is very inspirational. 🙏

  • @designckinet
    @designckinet Před měsícem

    Waiting for tutorial!

  • @Richard-on7hn
    @Richard-on7hn Před měsícem

    great demo can you show how to run llama3 on iOS ?

  • @warisruzi
    @warisruzi Před měsícem

    Do you have any plans to create a tutorial for using the Claude API to make an app? Claude's features are amazing.

    • @XCA
      @XCA  Před měsícem +1

      Hi nice suggestions. Will definitely explore Claude API

  • @aesuna2565
    @aesuna2565 Před 2 měsíci

    Great video! Curious how this is different from running the model in CoreML, like say from llama.cpp?

    • @XCA
      @XCA  Před 2 měsíci

      MLX can be used by AI researchers for developing and deploying ML Models from scratch. It is also optimized for M-Series Apple Silicon Chip. It is inspired by PyTorch, Jax, and other popular frameworks.
      I think CoreML is more suited for converting and optimizing existing ML models so it can be used on Apple devices.
      I think maybe MLX is more performant and efficient compared to CoreML as it is optimized for M series, the initial benchmark shows that it outperforms PyTorch.

  • @DzulkifleeTaib
    @DzulkifleeTaib Před 3 měsíci

    Awesome! Terima kasih! Can’t wait for the tutorial. Also are you able to also hook up a local whisperer as well? So everything is local?

    • @XCA
      @XCA  Před 3 měsíci +1

      Yes, everything is local running on Apple Silicon. I only tried Mistral7B & CodeLLaMA, the MLX documentation says is supports: LLaMA, Mistral, Gemma, and Phi.

  • @DzulkifleeTaib
    @DzulkifleeTaib Před 3 měsíci

    Thanks

    • @XCA
      @XCA  Před 3 měsíci

      You’re welcome!

  • @unk511
    @unk511 Před 3 měsíci

    What is the spec of you mac system, do you need a powerful machine to run it?

    • @XCA
      @XCA  Před 3 měsíci +1

      I'm using MacBook Pro 14 2021 with M1 Pro & 16GB of RAM. If you use LLM with 2b of params, 8GB RAM should be enough. For 7b LLM, you will need at least 16GB RAM

  • @financelician3564
    @financelician3564 Před 3 měsíci

    Crazy, would it be runnable on iOS?

    • @XCA
      @XCA  Před 3 měsíci +1

      Currently no, also the RAM on iOS is too small for model with 7B params. On my mac, Mistral7B uses around 10GB of RAM.

  • @ayushs_2k4
    @ayushs_2k4 Před 3 měsíci +1

    Can you share the code of App?

    • @XCA
      @XCA  Před 3 měsíci +1

      Here you go! github.com/alfianlosari/mlx-swift-examples

    • @ayushs_2k4
      @ayushs_2k4 Před 3 měsíci

      @@XCA Thank you

  • @pahwa88
    @pahwa88 Před 2 měsíci

    Thank you so much for your effort. Btw I am getting an error
    "Internal: Could not parse ModelProto from `/Users/xxx/Mistral-7B-v0.1-hf-4bit-mlx/tokenizer.model`"
    Do u know how to fix it?