Justfile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. set shell := ["bash", "-uc"]
  2. validate:
  3. uv run dataset/validate_schema.py
  4. uv run dataset/score_data.py
  5. for f in data/*.jsonl; do \
  6. uv run dataset/analyze_data.py --input "$f" --show-examples 0; \
  7. done
  8. score:
  9. uv run dataset/score_data.py
  10. schema:
  11. uv run dataset/validate_schema.py
  12. analyze:
  13. for f in data/*.jsonl; do \
  14. uv run dataset/analyze_data.py --input "$f" --show-examples 0; \
  15. done
  16. prepare:
  17. QMD_BASE_MODEL=Qwen/Qwen3-1.7B uv run dataset/prepare_data.py --seed 42
  18. train-local:
  19. just prepare
  20. HF_TOKEN=${HF_TOKEN} uv run torchrun --standalone --nproc_per_node auto \
  21. train.py sft --config configs/sft_local.yaml |& tee /tmp/qmd-sft-train.log
  22. grpo-local:
  23. CUDA_VISIBLE_DEVICES=1,2,3 HF_TOKEN=${HF_TOKEN} uv run torchrun --standalone --nproc_per_node 3 \
  24. train.py grpo --config configs/grpo.yaml |& tee /tmp/qmd-grpo-train.log
  25. gepa-local:
  26. UV_CACHE_DIR=/tmp/uv-cache LITELLM_CACHE_DIR=/tmp/litellm-cache OLLAMA_API_BASE=http://localhost:11434 \
  27. uv run python gepa/dspy_gepa.py \
  28. --input data/qmd_expansion_v2.jsonl \
  29. --model ollama/glm-4.7-flash:Q8_0 \
  30. --reflection-model ollama/glm-4.7-flash:Q8_0 \
  31. --max-metric-calls 100 --limit 20 \
  32. --valset data/qmd_expansion_handcrafted.jsonl --val-limit 20 \
  33. --max-tokens 512 --reflection-max-tokens 512 \
  34. --emit gepa/gepa_outputs_glm.jsonl \
  35. --save-prompt gepa/best_prompt_glm.txt