Instructions to use yhyet/FLEX34-PureLoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use yhyet/FLEX34-PureLoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("liuhaotian/llava-v1.5-7b") model = PeftModel.from_pretrained(base_model, "yhyet/FLEX34-PureLoRA") - Notebooks
- Google Colab
- Kaggle
FLEX34-PureLoRA
Final PureLoRA checkpoint after all 34 FLEX tasks, containing every trained expert and the NCM routing prototypes. The default router uses softmax logit scale 28 and equal image/text weights. Different routers can reuse these same experts without retraining.
- Code and environment setup
- FLEX instructions and image sources
- Task-to-expert mapping and per-task Base results
The Base reference scores are M = 54.60, G = 60.81%, and R = 83.77%.
This is a custom PURELORA adapter: use the FLEX repository's bundled PEFT
implementation and loading code. Download the base model and CLIP separately.
Download
hf download yhyet/FLEX34-PureLoRA --local-dir ./checkpoints/FLEX34-PureLoRA
The checkpoint consists of adapter_model.safetensors, adapter_config.json,
config.json, and purelora_state.pt. Keep all four in the same directory.
To verify the downloaded files, run sha256sum -c SHA256SUMS in that directory.
Inference
Install the FLEX code and prepare the instructions and images following its
README. In config/paths/llava_paths.py, set BASE_MODEL_PATH to your local
LLaVA-1.5-7B snapshot
and CLIP_PATH to your local
CLIP ViT-L/14-336 snapshot.
From the FLEX code directory, after downloading this checkpoint there:
export FLEX_INSTRUCTION_ROOT=/path/to/datasets/FLEX/instructions
export PURELORA_MIXTURE_LOGIT_SCALE=28
export PURELORA_IMAGE_WEIGHT=0.5
export PURELORA_TEXT_WEIGHT=0.5
python run.py infer $(seq 0 33) \
--benchmark flex --method purelora --backbone llava \
--model-path ./checkpoints/FLEX34-PureLoRA \
--checkpoint-task 33 --cl-task-num 34 --stage last \
--gpus 0 --batch-size 1 --temperature 0 --conv-mode vicuna_v1 \
--no-top1-expert-routing --no-oracle-expert-routing \
--accel-eval --run-stamp flex34-purelora-ncm28
For a short run, replace $(seq 0 33) with 0. The command uses the FLEX
code's default bfloat16 inference. For task-oracle inference, replace
--no-oracle-expert-routing with --oracle-expert-routing.
Base model revision: 4481d270cc22fd5c4d1bb5df129622006ccd9234.
Expert IDs 0β33 follow the fixed FLEX task order in task_mapping.json.
Use of the adapters is subject to the upstream base model and dataset terms.
- Downloads last month
- 20
Model tree for yhyet/FLEX34-PureLoRA
Base model
liuhaotian/llava-v1.5-7b