unslothai / unsloth

Finetune Llama 3.2, Mistral, Phi, Qwen 2.5 & Gemma LLMs 2-5x faster with 80% less memory
https://unsloth.ai
Apache License 2.0
18.4k stars 1.29k forks source link

DOC Update - Update README.md with os.environ in example #1269

Closed udaygirish closed 1 week ago

udaygirish commented 1 week ago

Added OS Environ in example to avoid device conflicts , for a user at least in jupyter notebook this allows to select GPU in a multi GPU setup. As currently the unsloth init checks all GPU's and takes the first in the order which can be a issue when some GPU's are in use and the list still shows them. So to manually avoid this, this os config is required. Small change but a bit time saver for those who straight away copies the tutorials

I have seen one change similar to this changing throughout the code using a check method but I feel mentioning in tutorials or on ReadMe is more than enough, I can also try to change the whole code to leverage this, but gonna take a bit time

danielhanchen commented 1 week ago

Thanks! Added the change :)