|
Download ml-stable-diffusion/mlx/examples/export/README.md from Fahad-S/FastVLM_SANA: direct link, hf CLI and curl.
- Browser
- Download file 685 Bytes
-
https://huggingface.co/Fahad-S/FastVLM_SANA/resolve/main/ml-stable-diffusion/mlx/examples/export/README.md
- Command line
-
hf download hf://Fahad-S/FastVLM_SANA/ml-stable-diffusion/mlx/examples/export/README.md
-
curl -L -o README.md https://huggingface.co/Fahad-S/FastVLM_SANA/resolve/main/ml-stable-diffusion/mlx/examples/export/README.md
685 Bytes
| ## Setup | |
| Install MLX: | |
| ```bash | |
| pip install mlx>=0.22 | |
| ``` | |
| Build the C++ examples: | |
| ```bash | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build | |
| ``` | |
| ## Run | |
| ### Eval MLP | |
| Run the Python script to export the eval function: | |
| ```bash | |
| python eval_mlp.py | |
| ``` | |
| Then run the C++ program to import and run the function: | |
| ``` | |
| ./build/eval_mlp | |
| ``` | |
| The Python and C++ programs should output the same result. | |
| ### Train MLP | |
| Run the Python script to export the model initialization and training | |
| functions: | |
| ```bash | |
| python train_mlp.py | |
| ``` | |
| Then run the C++ program to import and run the functions: | |
| ``` | |
| ./build/train_mlp | |
| ``` | |
| The Python and C++ programs should output the same results. | |