{
  "id": 443521,
  "title": "how to use kaggle GPU with huggingface pipeline ",
  "url": "/competitions/bengaliai-speech/discussion/443521",
  "author_name": "",
  "post_date": "2023-09-27T16:37:18.462364700Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I can't use the GPU of kaggle with the pipeline function from huggingface, <br>\nmy code:<br>\n`path_example = \"/kaggle/input/bengaliai-speech/examples/Audiobook.wav\"</p>\n<p>example , _ = librosa.load(path, sr =None)</p>\n<p>pipe  = pipeline(\"automatic-speech-recognition\" , <br>\n                     model = \"Umong/wav2vec2-large-mms-1b-bengali\",<br>\n                    device = 0 ## tried to add device= 0 and remove but no difference<code>`\n                    )\n</code></p>",
  "messages": [
    {
      "id": "2458525",
      "postDate": "09/27/2023 16:37:18",
      "content": "<p>I can't use the GPU of kaggle with the pipeline function from huggingface, <br>\nmy code:<br>\n`path_example = \"/kaggle/input/bengaliai-speech/examples/Audiobook.wav\"</p>\n<p>example , _ = librosa.load(path, sr =None)</p>\n<p>pipe  = pipeline(\"automatic-speech-recognition\" , <br>\n                     model = \"Umong/wav2vec2-large-mms-1b-bengali\",<br>\n                    device = 0 ## tried to add device= 0 and remove but no difference<code>`\n                    )\n</code></p>",
      "rawMarkdown": "I can't use the GPU of kaggle with the pipeline function from huggingface, \nmy code:\n`path_example = \"/kaggle/input/bengaliai-speech/examples/Audiobook.wav\"\n\nexample , _ = librosa.load(path, sr =None)\n\npipe  = pipeline(\"automatic-speech-recognition\" , \n                     model = \"Umong/wav2vec2-large-mms-1b-bengali\",\n                    device = 0 ## tried to add device= 0 and remove but no difference``\n                    )\n`",
      "votes": null
    },
    {
      "id": "2458613",
      "postDate": "09/27/2023 17:15:06",
      "content": "<p>Maybe try pipe = pipeline(\"automatic-speech-recognition\", device = 'cuda' )</p>",
      "rawMarkdown": "Maybe try pipe = pipeline(\"automatic-speech-recognition\", device = 'cuda' )",
      "votes": null
    },
    {
      "id": "2458694",
      "postDate": "09/27/2023 18:14:33",
      "content": "<p>thanks for your reply, but no change it still runs on the cpu , gpu is 0 %</p>",
      "rawMarkdown": "thanks for your reply, but no change it still runs on the cpu , gpu is 0 %",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2458613,
      "author_name": "hubert101",
      "author_url": "",
      "post_date": "09/27/2023 17:15:06",
      "content": "<p>Maybe try pipe = pipeline(\"automatic-speech-recognition\", device = 'cuda' )</p>",
      "votes": null,
      "replies": [
        {
          "id": 2458694,
          "author_name": "mohamedantargad",
          "author_url": "",
          "post_date": "09/27/2023 18:14:33",
          "content": "<p>thanks for your reply, but no change it still runs on the cpu , gpu is 0 %</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2458525": "I can't use the GPU of kaggle with the pipeline function from huggingface, \nmy code:\n`path_example = \"/kaggle/input/bengaliai-speech/examples/Audiobook.wav\"\n\nexample , _ = librosa.load(path, sr =None)\n\npipe  = pipeline(\"automatic-speech-recognition\" , \n                     model = \"Umong/wav2vec2-large-mms-1b-bengali\",\n                    device = 0 ## tried to add device= 0 and remove but no difference``\n                    )\n`",
    "2458613": "Maybe try pipe = pipeline(\"automatic-speech-recognition\", device = 'cuda' )",
    "2458694": "thanks for your reply, but no change it still runs on the cpu , gpu is 0 %"
  },
  "source": "meta"
}