<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Download Dolly model on local machine in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/download-dolly-model-on-local-machine/m-p/39234#M5616</link>
    <description>&lt;P&gt;Hi Kaniz and Sean, thanks for your responses and time.&lt;BR /&gt;I was trying Kaniz's method, but got a reply from Sean, so I tried that too. I downloaded the file from the link Sean provided and saved it on my local machine, then used the code for Dollyv2 (&lt;A href="https://huggingface.co/databricks/dolly-v2-3b" target="_blank"&gt;https://huggingface.co/databricks/dolly-v2-3b&lt;/A&gt;) and ran it successfully without connecting to Huggingface/ Databricks. Haven't tried without internet, but I think it will work too. Thanks again Kaniz and Sean for your replies!&lt;/P&gt;&lt;P&gt;code I used:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;pip &lt;/SPAN&gt;&lt;SPAN&gt;install &lt;/SPAN&gt;&lt;SPAN&gt;"accelerate&amp;gt;=0.16.0,&amp;lt;1"&lt;/SPAN&gt; &lt;SPAN&gt;"transformers[torch]&amp;gt;=4.28.1,&amp;lt;5"&lt;/SPAN&gt; &lt;SPAN&gt;"torch&amp;gt;=1.13.1,&amp;lt;2"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; torch&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; transformers &lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; pipeline&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;generate_text = pipeline&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;model=&lt;/SPAN&gt;&lt;SPAN&gt;"local_machine/path/to/downloaded_Dolly_folder"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; torch_dtype=torch.bfloat16&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; trust_remote_code=&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; device_map=&lt;/SPAN&gt;&lt;SPAN&gt;"auto"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;res = generate_text&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Explain to me the difference between nuclear fission and fusion."&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;res&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;][&lt;/SPAN&gt;&lt;SPAN&gt;"generated_text"&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 07 Aug 2023 08:08:40 GMT</pubDate>
    <dc:creator>FutureLegend</dc:creator>
    <dc:date>2023-08-07T08:08:40Z</dc:date>
    <item>
      <title>Download Dolly model on local machine</title>
      <link>https://community.databricks.com/t5/get-started-discussions/download-dolly-model-on-local-machine/m-p/38977#M5613</link>
      <description>&lt;P&gt;Hi~ I am new to LLM engineering, and am trying to download the Dolly-v2-7b model on local machine, so I don't need to connect to internet each time I am going to run the Dolly-v2-7b. Is it possible to do that? Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 05:33:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/download-dolly-model-on-local-machine/m-p/38977#M5613</guid>
      <dc:creator>FutureLegend</dc:creator>
      <dc:date>2023-08-03T05:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Download Dolly model on local machine</title>
      <link>https://community.databricks.com/t5/get-started-discussions/download-dolly-model-on-local-machine/m-p/39120#M5615</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;this is not necessary for downloading a model; it actually has nothing to do with Databricks.&lt;/P&gt;&lt;P&gt;Dolly is hosted on Hugging Face. If you download it via transformers, it will actually cache it and not download again, already. But you can always just download the files of any model to a local dir:&amp;nbsp;&lt;A href="https://huggingface.co/databricks/dolly-v2-12b/tree/main" target="_blank"&gt;https://huggingface.co/databricks/dolly-v2-12b/tree/main&lt;/A&gt;&amp;nbsp;You then load that local dir as a model.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 14:58:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/download-dolly-model-on-local-machine/m-p/39120#M5615</guid>
      <dc:creator>sean_owen</dc:creator>
      <dc:date>2023-08-04T14:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Download Dolly model on local machine</title>
      <link>https://community.databricks.com/t5/get-started-discussions/download-dolly-model-on-local-machine/m-p/39234#M5616</link>
      <description>&lt;P&gt;Hi Kaniz and Sean, thanks for your responses and time.&lt;BR /&gt;I was trying Kaniz's method, but got a reply from Sean, so I tried that too. I downloaded the file from the link Sean provided and saved it on my local machine, then used the code for Dollyv2 (&lt;A href="https://huggingface.co/databricks/dolly-v2-3b" target="_blank"&gt;https://huggingface.co/databricks/dolly-v2-3b&lt;/A&gt;) and ran it successfully without connecting to Huggingface/ Databricks. Haven't tried without internet, but I think it will work too. Thanks again Kaniz and Sean for your replies!&lt;/P&gt;&lt;P&gt;code I used:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;pip &lt;/SPAN&gt;&lt;SPAN&gt;install &lt;/SPAN&gt;&lt;SPAN&gt;"accelerate&amp;gt;=0.16.0,&amp;lt;1"&lt;/SPAN&gt; &lt;SPAN&gt;"transformers[torch]&amp;gt;=4.28.1,&amp;lt;5"&lt;/SPAN&gt; &lt;SPAN&gt;"torch&amp;gt;=1.13.1,&amp;lt;2"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; torch&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; transformers &lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; pipeline&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;generate_text = pipeline&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;model=&lt;/SPAN&gt;&lt;SPAN&gt;"local_machine/path/to/downloaded_Dolly_folder"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; torch_dtype=torch.bfloat16&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; trust_remote_code=&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; device_map=&lt;/SPAN&gt;&lt;SPAN&gt;"auto"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;res = generate_text&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Explain to me the difference between nuclear fission and fusion."&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;res&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;][&lt;/SPAN&gt;&lt;SPAN&gt;"generated_text"&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:08:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/download-dolly-model-on-local-machine/m-p/39234#M5616</guid>
      <dc:creator>FutureLegend</dc:creator>
      <dc:date>2023-08-07T08:08:40Z</dc:date>
    </item>
  </channel>
</rss>

