LoginSignup
5
1

More than 1 year has passed since last update.

DatabricksでDolly 2.0を動かしてみる

Last updated at Posted at 2023-04-14

こちらの続編です。

すでに動かして、チャットサーバーまで立てられている方もいらっしゃいます。

こちらのモデルを使用します。なお、より小規模なGPUで動作するdolly-v2-3bdolly-v2-7bも公開されています。

g5-48xlargeのスペックのクラスターを使っています。
Screenshot 2023-04-14 at 16.21.22.png

%pip install accelerate>=0.12.0 transformers[torch]==4.25.1
Python
import torch
from transformers import pipeline

generate_text = pipeline(model="databricks/dolly-v2-12b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")

核分裂と核融合の違いを説明してください。

Python
generate_text("Explain to me the difference between nuclear fission and fusion.")

Out[2]: "Nuclear fission and fusion is how the nucleus of an atom splits and combines itself into a more reduced size. Nuclear fission is how material was split from an element during it'sBreakdown into simpler elements. Nuclear fusion is how two simpler elements were combined to make a new more complex element. Nuclear fission is most common in radioactive isotopes of Uranium and Plutonium, these isotopes have a nuclear structure that can split into two smaller isotopes. Nuclear fusion is how the nuclei of the two lighter isotopes of hydrogen (deuterium and tritium) can join to create a stable isotope of helium, Helium-3."

核分裂と核融合は、原子核が分裂する、あるいは、自身をより小さいサイズに結合する過程を意味します。核分裂は、よりシンプルな元素へのブレークダウンを通じて要素から物質が分割される過程です。核融合は、新たなより複雑な元素を作り出すために、二つのシンプルな元素が結合される過程です。核分裂は、ウラニウムとプルトニウムの放射性アイソトープでは最も一般的で、これらのアイソトープは二つのより小さいアイソトープに分割できる核構造を有しています。核融合は、ヘリウムやHelium-3の安定したアイソトープを作成するために、より軽い水素のアイソトープ(デューテリウム、トリチウム)の原子核が結合する過程です。

Databricksとはなんですか?

Python
generate_text("What is databricks?")

Out[6]: 'Databricks is an American software company headquartered in San Francisco that develops a cross-platform data platform. The company was founded in 2013 by Ali Ghodsi, Andy Konwinski, Arsalan Tavakoli-Shiraji, Ion Stoica, Matei Zaharia, Patrick Wendell and Reynold Xin.'

Databricksはクロスプラットフォームのデータプラットフォームを開発する、サンフランシスコに本社があるアメリカの企業です。この企業はAli Ghodsi, Andy Konwinski, Arsalan Tavakoli-Shiraji, Ion Stoica, Matei Zaharia, Patrick Wendell and Reynold Xinによって2013年に創業されました。

人工知能とはなんですか?

Python
generate_text("What is artificial intelligence?")

Out[7]: 'AI is a branch of computer science that focuses on how to create computers that can think and do what is equivalent to human intelligence. AI is most commonly used in mobile phones and virtual assistants like Alexa.'

AIは、考えることができ、人間の知性と同じことを行えるコンピューターを作成する方法にフォーカスするコンピューターサイエンスの1分派です。

英語だと結構きちんとした回答が返ってきます。

続きはこちら。

Databricksクイックスタートガイド

Databricksクイックスタートガイド

Databricks無料トライアル

Databricks無料トライアル

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1