artidoro / qlora

QLoRA: Efficient Finetuning of Quantized LLMs
https://arxiv.org/abs/2305.14314
MIT License
10.08k stars 823 forks source link

[Question] Why can we set `model_parallel` and `is_parallelizable` to `True` for whichever `model`? #259

Open tongyx361 opened 1 year ago

tongyx361 commented 1 year ago

There are two lines of code in qlora.py that are so confusing (for me):

    setattr(model, "model_parallel", True)
    setattr(model, "is_parallelizable", True)

What if the model didn't support model parallelism?