SSブログ

LLM [科学、数学]

今週末は、土日とも雨になってしまいましたので、先週の桜の写真を








先週、google/flan-t5-xxlというLLM(Large Language Model)を試しましたが、今回は、それよりも小さなメモリで動くgoogle/flan-ul2 (https://huggingface.co/google/flan-ul2 ) というのを使ってみました。

huggingfaseのサイトの使い方
https://huggingface.co/google/flan-ul2#using-the-model
を見ると、簡単な計算問題もできるらしいです。
Answer the following question by reasoning step by step. The cafeteria had 23 apples. If they used 20 for lunch, and bought 6 more, how many apple do they have?
に対して、
They have 23 - 20 = 3 apples left. They have 3 + 6 = 9 apples. Therefore, the answer is 9.
と、答える例が書かれていました。

このままのデーターが学習データに入っているのではなく、ちゃんと文を理解して計算してるのか、数字を変えて質問してみました。

Q: Answer the following question by reasoning step by step. The cafeteria had 23 apples. If they used 19 for lunch, and bought 6 more, how many apple do they have?
A: They have 23 - 19 = 4 apples left. They have 4 + 6 = 10 apples. Therefore, the answer is 10.

ちゃんとできてます。
ちなみに、flan-t5では、
The cafeteria has 23 - 19 = 4 apples. They have 4 + 6 = 10 apples. Therefore, the answer is 10.
という答えが返ってきます。

Q: "Why Do Japanese People Love Sakura so Much?"
A: Sakura is a symbol of the beauty of life and the transience of life.

flan-t5では、Japanese people love cherry blossomstという、そっけない答えだったけど、
「桜は、命の美しさと儚さのシンボルだから」って、どこで、こんなこと覚えたのでしょう?
手塚治虫の「アドルフに告ぐ」で、大和魂って知ってるのかと聞かれたアドルフ・カミルが、「ひさかたのォ、光のどけき春の日に、しず心なく花の散るらん、でっしゃろ」って答えたのを思い出してしまいました。

Q: How do you investigate vitamin C content in food and drinks?
A: You can look at the label on the package.

食品や飲料品にビタミンCが入っているかどうか調べる方法は?
「パッケージのラベルを見ろ」って、 「spectrophotometer ( 分光光度計 )を使え」って答えたflan-t5より上手かもしれない。

次は、イギリスの中学生の学力テストGCSEの例題
Q: Why did the discoveries of the Renaissance make little practical difference to medical treatment in the period c1500-c1700?
( ルネサンス期の発見が、1500年から1700年の間、医療にほとんど実用的な進歩をもたらさなかったのはなぜか?)

これは、flan-t5では、
syphilis was cured
( 梅毒が治ったから )
という、意味不明な答えでしたが、
flan-ul2は、
the medical profession was dominated by quacks
( 医療の専門家がヤブ医者ばっかりだったから ) って、なんかすごいぞ flan-ul2
( ちなみに、GCSEでは回答として、ルネッサンス期の発見は、解剖学とか外科的なものが中心だったので、医療の進歩には、あまり貢献しなかった。のようなものを期待しています。)




nice!(15)  コメント(0) 

nice! 15

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。