I'm running Docker (WSL2; local; Nvidia 3080 GPU) with the unsloth/unsloth:stable image. When trying to run the embedding fine-tuning notebook (EmbeddingGemma_(300M).ipynb ), I get this error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from unsloth import FastSentenceTransformer
3 fourbit_models = [
4 "unsloth/all-MiniLM-L6-v2",
5 "unsloth/embeddinggemma-300m",
(...) 11
12 ] # More models at https://huggingface.co/unsloth
14 model = FastSentenceTransformer.from_pretrained(
15 model_name = "unsloth/embeddinggemma-300m",
16 max_seq_length = 1024, # Choose any for long context!
17 full_finetuning = False, # [NEW!] We have full finetuning now!
18 )
ImportError: cannot import name 'FastSentenceTransformer' from 'unsloth' (/opt/conda/lib/python3.11/site-packages/unsloth/__init__.py)
Since the top-level module comes from unsloth, I'm puzzled by the error; surely the docker image has unsloth and its dependencies correctly installed by default? Any suggestions?
Things I'm certain of
- Nvidia GPU correctly detected and used in Docker