From caa78124a3fe08c64690330d5277301e15bdb1c2 Mon Sep 17 00:00:00 2001 From: NexVeridian Date: Mon, 9 Jun 2025 15:46:53 -0700 Subject: [PATCH] add hf org to just file --- content/blog/llm-inference-benchmarks.md | 3 ++- justfile | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/content/blog/llm-inference-benchmarks.md b/content/blog/llm-inference-benchmarks.md index a5fed53..d56c606 100644 --- a/content/blog/llm-inference-benchmarks.md +++ b/content/blog/llm-inference-benchmarks.md @@ -54,12 +54,13 @@ https://huggingface.co/docs/hub/en/mlx https://huggingface.co/mlx-community +git clone git@github.com:NexVeridian/NexVeridian-web.git ```bash uv venv uv pip install huggingface_hub hf_transfer mlx_lm uv run huggingface-cli login -just mlx_create "Qwen/QwQ-32B" "4 6 8" "/Users/elijahmcmorris/.cache/lm-studio/models" "false" +just mlx_create "Qwen/QwQ-32B" "4 6 8" "/Users/elijahmcmorris/.cache/lm-studio/models" "mlx-community" "false" # or uv run mlx_lm.convert --hf-path Qwen/QwQ-32B -q --q-bits 4 --upload-repo mlx-community/QwQ-32B-4bit --mlx-path /Users/elijahmcmorris/.cache/lm-studio/models/mlx-community/QwQ-32B-4bit ``` diff --git a/justfile b/justfile index d6f209a..a05bd5f 100644 --- a/justfile +++ b/justfile @@ -12,42 +12,42 @@ docker: rm -rf result docker image prune -f -# just mlx_create "Qwen/QwQ-32B" "4 6 8" "/Users/elijahmcmorris/.cache/lm-studio/models" "false" -mlx_create hf_url quant lm_studio_path upload_repo="false": +# just mlx_create "Qwen/QwQ-32B" "4 6 8" "/Users/elijahmcmorris/.cache/lm-studio/models" "mlx-community" "false" +mlx_create hf_url quant lm_studio_path org="mlx-community" upload_repo="false": #!/usr/bin/env bash just clean_lmstudio "{{hf_url}}" "{{quant}}" "{{lm_studio_path}}" for q in {{quant}}; do echo -e '\nConverting {{hf_url}} to '"$q"'-bit quantization\n' repo_name=$(basename {{hf_url}}) - rm {{lm_studio_path}}/mlx-community/${repo_name}-${q}bit + rm {{lm_studio_path}}/{{org}}/${repo_name}-${q}bit if [[ {{upload_repo}} == "true" ]]; then uv run mlx_lm.convert \ --hf-path {{hf_url}} \ -q \ --q-bits ${q} \ - --upload-repo mlx-community/${repo_name}-${q}bit \ - --mlx-path {{lm_studio_path}}/mlx-community/${repo_name}-${q}bit + --upload-repo {{org}}/${repo_name}-${q}bit \ + --mlx-path {{lm_studio_path}}/{{org}}/${repo_name}-${q}bit else uv run mlx_lm.convert \ --hf-path {{hf_url}} \ -q \ --q-bits ${q} \ - --mlx-path {{lm_studio_path}}/mlx-community/${repo_name}-${q}bit + --mlx-path {{lm_studio_path}}/{{org}}/${repo_name}-${q}bit fi done - just clean_lmstudio "{{hf_url}}" "{{quant}}" "{{lm_studio_path}}" + just clean_lmstudio "{{hf_url}}" "{{quant}}" "{{lm_studio_path}}" "{{org}}" clean_hf: rm -r ~/.cache/huggingface/hub/* -# just clean_lmstudio "Qwen/QwQ-32B" "4 6 8" "/Users/elijahmcmorris/.cache/lm-studio/models" -clean_lmstudio hf_url quant lm_studio_path: +# just clean_lmstudio "Qwen/QwQ-32B" "4 6 8" "/Users/elijahmcmorris/.cache/lm-studio/models" "mlx-community" +clean_lmstudio hf_url quant lm_studio_path org="mlx-community": #!/usr/bin/env bash repo_name=$(basename {{hf_url}}) for q in {{quant}}; do - rm -r {{lm_studio_path}}/mlx-community/${repo_name}-${q}bit || true + rm -r {{lm_studio_path}}/{{org}}/${repo_name}-${q}bit || true done