add hf org to just file

This commit is contained in:
Elijah McMorris 2025-06-09 15:46:53 -07:00
parent c8209ce370
commit caa78124a3
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
2 changed files with 12 additions and 11 deletions

View file

@ -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