From 5a83d7d92bbd9726346c49c62f8856c522f90dce Mon Sep 17 00:00:00 2001 From: David Koski Date: Thu, 22 Feb 2024 12:46:44 -0800 Subject: [PATCH] fix broken links, clarify documentation --- Libraries/LLM/README.md | 12 ++++++++++-- README.md | 4 ++-- Tools/llm-tool/README.md | 11 +++++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Libraries/LLM/README.md b/Libraries/LLM/README.md index 9ca29b3..482e661 100644 --- a/Libraries/LLM/README.md +++ b/Libraries/LLM/README.md @@ -1,11 +1,19 @@ # Llama -This is a port of the llama model from: +This is a port of several models from: -- https://github.com/ml-explore/mlx-examples/blob/main/llms/mlx_lm/models/llama.py +- https://github.com/ml-explore/mlx-examples/blob/main/llms/mlx_lm/models/ You can use this to load models from huggingface, e.g.: - https://huggingface.co/mlx-community/Mistral-7B-v0.1-hf-4bit-mlx +Currently supported model types are: + +- Llama / Mistral +- Gemma +- Phi + +See [Configuration.swift](Configuration.swift) for more info. + See [llm-tool](../../Tools/llm-tool) diff --git a/README.md b/README.md index 7a2e4f9..adec90b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MLX Swift Examples -Example (mlx-swift)[https://github.com/ml-explore/mlx-swift] programs. +Example [mlx-swift](https://github.com/ml-explore/mlx-swift) programs. ## LinearModelTraining @@ -10,7 +10,7 @@ A simple linear model and a training loop. ## llm-tool -A command line tool for generating text using a Llama / Mistral model: +A command line tool for generating text using a variety of Hugging Face models: - [README](Tools/llm-tool/README.md) diff --git a/Tools/llm-tool/README.md b/Tools/llm-tool/README.md index 81b2151..0efd0c9 100644 --- a/Tools/llm-tool/README.md +++ b/Tools/llm-tool/README.md @@ -2,7 +2,7 @@ See various READMEs: -- [Llama](../../Libraries/Llama/README.md) +- [LLM](../../Libraries/LLM/README.md) ### Building @@ -21,7 +21,14 @@ To run this in Xcode simply press cmd-opt-r to set the scheme arguments. For ex Then cmd-r to run. > Note: you may be prompted for access to your Documents directory -- this is where -the huggingface HubApi stores the downloaded files. +the Hugging Face HubApi stores the downloaded files. + +The model should be a path in the Hugging Face repository, e.g.: + +- `mlx-community/Mistral-7B-v0.1-hf-4bit-mlx` +- `mlx-community/phi-2-hf-4bit-mlx` + +See [LLM](../../Libraries/LLM/README.md) for more info. ### Running (Command Line)