add hf org to just file
This commit is contained in:
parent
c8209ce370
commit
caa78124a3
2 changed files with 12 additions and 11 deletions
|
@ -54,12 +54,13 @@ https://huggingface.co/docs/hub/en/mlx
|
||||||
|
|
||||||
https://huggingface.co/mlx-community
|
https://huggingface.co/mlx-community
|
||||||
|
|
||||||
|
git clone git@github.com:NexVeridian/NexVeridian-web.git
|
||||||
```bash
|
```bash
|
||||||
uv venv
|
uv venv
|
||||||
uv pip install huggingface_hub hf_transfer mlx_lm
|
uv pip install huggingface_hub hf_transfer mlx_lm
|
||||||
uv run huggingface-cli login
|
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
|
# 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
|
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
|
||||||
```
|
```
|
||||||
|
|
20
justfile
20
justfile
|
@ -12,42 +12,42 @@ docker:
|
||||||
rm -rf result
|
rm -rf result
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
|
|
||||||
# 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"
|
||||||
mlx_create hf_url quant lm_studio_path upload_repo="false":
|
mlx_create hf_url quant lm_studio_path org="mlx-community" upload_repo="false":
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
just clean_lmstudio "{{hf_url}}" "{{quant}}" "{{lm_studio_path}}"
|
just clean_lmstudio "{{hf_url}}" "{{quant}}" "{{lm_studio_path}}"
|
||||||
|
|
||||||
for q in {{quant}}; do
|
for q in {{quant}}; do
|
||||||
echo -e '\nConverting {{hf_url}} to '"$q"'-bit quantization\n'
|
echo -e '\nConverting {{hf_url}} to '"$q"'-bit quantization\n'
|
||||||
repo_name=$(basename {{hf_url}})
|
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
|
if [[ {{upload_repo}} == "true" ]]; then
|
||||||
uv run mlx_lm.convert \
|
uv run mlx_lm.convert \
|
||||||
--hf-path {{hf_url}} \
|
--hf-path {{hf_url}} \
|
||||||
-q \
|
-q \
|
||||||
--q-bits ${q} \
|
--q-bits ${q} \
|
||||||
--upload-repo mlx-community/${repo_name}-${q}bit \
|
--upload-repo {{org}}/${repo_name}-${q}bit \
|
||||||
--mlx-path {{lm_studio_path}}/mlx-community/${repo_name}-${q}bit
|
--mlx-path {{lm_studio_path}}/{{org}}/${repo_name}-${q}bit
|
||||||
else
|
else
|
||||||
uv run mlx_lm.convert \
|
uv run mlx_lm.convert \
|
||||||
--hf-path {{hf_url}} \
|
--hf-path {{hf_url}} \
|
||||||
-q \
|
-q \
|
||||||
--q-bits ${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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
just clean_lmstudio "{{hf_url}}" "{{quant}}" "{{lm_studio_path}}"
|
just clean_lmstudio "{{hf_url}}" "{{quant}}" "{{lm_studio_path}}" "{{org}}"
|
||||||
|
|
||||||
|
|
||||||
clean_hf:
|
clean_hf:
|
||||||
rm -r ~/.cache/huggingface/hub/*
|
rm -r ~/.cache/huggingface/hub/*
|
||||||
|
|
||||||
# just clean_lmstudio "Qwen/QwQ-32B" "4 6 8" "/Users/elijahmcmorris/.cache/lm-studio/models"
|
# 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:
|
clean_lmstudio hf_url quant lm_studio_path org="mlx-community":
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
repo_name=$(basename {{hf_url}})
|
repo_name=$(basename {{hf_url}})
|
||||||
for q in {{quant}}; do
|
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
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue