3

I'm using the Huggingface's Transformers pipeline function to download the model and the tokenizer, my Windows PC downloaded them but I don't know where they are stored on my PC. Can you please help me? enter image description here

from transformers import pipeline

qa_pipeline = pipeline(
    "question-answering",
    model="mrm8488/bert-multi-cased-finetuned-xquadv1",
    tokenizer="mrm8488/bert-multi-cased-finetuned-xquadv1"
)
Luan Tran
  • 376
  • 1
  • 3
  • 15

2 Answers2

3

You can check the default location with:

import transformers #it is important to load the library before checking!
import os
os.environ['TRANSFORMERS_CACHE']

In case you want to change the default location, please have a lock at this answer.

cronoik
  • 15,434
  • 3
  • 40
  • 78
0

The default folder for models is at ~/.cache/huggingface And here's the doc from huggingface https://huggingface.co/docs/transformers/installation#cache-setup

杨晨豪
  • 21
  • 2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/34535148) – Chenmunka Jun 14 '23 at 20:54