|
Download tasks/tasksmith-a27f5bd16532/instruction.md from FineEnvs/HF_ML_Tasksmith: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/datasets/FineEnvs/HF_ML_Tasksmith/resolve/main/tasks/tasksmith-a27f5bd16532/instruction.md
- Command line
-
hf download hf://datasets/FineEnvs/HF_ML_Tasksmith/tasks/tasksmith-a27f5bd16532/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/FineEnvs/HF_ML_Tasksmith/resolve/main/tasks/tasksmith-a27f5bd16532/instruction.md
1.96 kB
Add LoRA support for the tensor-parallel models supplied by the installed Transformers integration.
A model loaded with tp_plan="auto" has linear layers marked with _hf_tp_plan and _hf_device_mesh. LoRA should work when those layers use the supported colwise and rowwise plans across two GPUs. Keep the ordinary non-parallel LoRA behavior working.
The expected behavior is:
- Adapter forward and backward computation follows the base layer's partitioning. Training must leave the replicated adapter weights consistent across ranks: the A factor for colwise layers and the B factor for rowwise layers.
- Replicated factors start from the same initialized values on every rank with standard (
init_lora_weights=True) and Gaussian (init_lora_weights="gaussian") initialization. This task covers those two initialization modes. Sharded factors retain the appropriate local dimensions. - A non-parallel adapter checkpoint can be loaded into the parallel model. Both factors must contain the correct values for their local partition, including nonzero saved factors; a successful load or matching shape alone is insufficient.
- Multiple named adapters can be added and selected with the existing PEFT APIs. Switching adapters must select that adapter's computation and switching back must restore its results.
- If the installed Transformers version is older than 5.4.0, attempting to wrap a parallel base model raises a RuntimeError explaining that Transformers >= 5.4.0 is required. Export
is_transformers_ge_v5_4_0frompeft.import_utilsconsistently with the other version helpers.
The image supplies Transformers 5.4.0, two CUDA devices and offline copies of peft-internal-testing/zephyr-smol_llama-100m-sft-full and Qwen/Qwen3-0.6B. Use /opt/tasksmith-venv/bin/python for the preinstalled environment. Work in /workspace and implement changes under src/peft. The evaluator runs in a fresh environment with your submitted source files.