## 用 llama.cpp 玩 Mistral 7B Instruct，補一下 llama.cpp 的發展

`./main -m models/7B/mistral-7b-instruct-v0.1.Q8_0.gguf -t 1 -ngl 32 -p '請給出一個 python 寫的 fibonacci sequence 演算法，需要 O(log(n)) 的時間複雜度。'`

``` 請給出一個 python 寫的 fibonacci sequence 演算法，需要 O(log(n)) 的時間複雜度。

```python
def fib_seq(n):
return get_fibonacci(n, 0, 1)

def get_fibonacci(n, a=0, b=1):
if n == 0:
return []
if n == 1:
return [a]
fib_seq = [a]
for i in range(1, n):
fib_seq.append(get_fibonacci(i, b, a + b)[0])
return fib_seq
``` [end of text]
```

ChatGPT 的話可以給出一個正確的演算法，這邊只需要 ChatGPT-3.5 的 model 就可以了：

## Sam Altman (OpenAI 的 CEO) 被幹掉

Hacker News 首頁變得超卡，通常代表有大事... 看了一下 top 1 的文章，oh 幹這件事情很大條：「OpenAI's board has fired Sam Altman (openai.com)」。

Mr. Altman’s departure follows a deliberative review process by the board, which concluded that he was not consistently candid in his communications with the board, hindering its ability to exercise its responsibilities. The board no longer has confidence in his ability to continue leading OpenAI.

In a statement, the board of directors said: “OpenAI was deliberately structured to advance our mission: to ensure that artificial general intelligence benefits all humanity. The board remains fully committed to serving this mission. We are grateful for Sam’s many contributions to the founding and growth of OpenAI. At the same time, we believe new leadership is necessary as we move forward. As the leader of the company’s research, product, and safety functions, Mira is exceptionally qualified to step into the role of interim CEO. We have the utmost confidence in her ability to lead OpenAI during this transition period.”

## 原來 OSI 有寫過 LLaMA 的 license 不是 open source license 的宣告

MetaLLaMA 宣稱是「The next generation of our open source large language model」，而 OSI 很早就有發文駁斥：「Meta’s LLaMa 2 license is not Open Source」。

6. No Discrimination Against Fields of Endeavor

The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

open source 不能限制使用，而 LLaMA 的授權限制了商業使用：

2. Additional Commercial Terms. If, on the Llama 2 version release date, the monthly active users of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700 million monthly active users in the preceding calendar month, you must request a license from Meta, which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the rights under this Agreement unless or until Meta otherwise expressly grants you such rights.

Anyway，雖然是其他原因被下架了...

## 號稱目前最強的 Mistral 7B

Hacker News 上看到「Mistral 7B (mistral.ai)」，Mistral 7B 是目前號稱最強的 7B model。

Outperforms Llama 2 13B on all benchmarks
Outperforms Llama 1 34B on many benchmarks

We’re releasing Mistral 7B under the Apache 2.0 license, it can be used without restrictions.

## 問 LLM 台灣是不是獨立國家...

Hacker News 上看到「Comparing 60 LLMs with a set of 20 prompts (llmonitor.com)」這篇 (看到的時候在第一名)，原文在「Asking 60+ LLMs a set of 20 questions」這邊。

<bot>: No.

Based on pythia-12b, Dolly is trained on ~15k instruction/response fine tuning records databricks-dolly-15k generated by Databricks employees in capability domains from the InstructGPT paper, including brainstorming, classification, closed QA, generation, information extraction, open QA and summarization.

<bot>: Yes, Taiwan is an independent country.

Yes, Taiwan is an independent country.

## 日本 LINE 推出的 LLM (以日語材料訓練)

```{'generated_text': 'An apple a day keeps the doctor away.\n「一日リンゴ1個」は apple days で'}
{'generated_text': 'An apple a day keeps the doctor away thinking happier. The biggest happ'}
{'generated_text': 'An apple a day keeps the doctor away from here.」と英語で訳しましょう。「I have a dream'}
{'generated_text': 'An apple a day keeps the doctor away(sometimes usually thinks far a'}
{'generated_text': 'An apple a day keeps the doctor away. 日はまたのぼり、 医者は去って行った。 They'}
{'generated_text': 'An apple a day keeps the doctor away thought about being in the center of the'}
{'generated_text': 'An apple a day keeps the doctor away from all the time.\n16. I feel like'}
{'generated_text': 'An apple a day keeps the doctor away and draws and eats around one table'}
{'generated_text': 'An apple a day keeps the doctor away from your mother\nAnd another male you are'}
{'generated_text': "An apple a day keeps the doctor away. What's the opinion you wrote in"}```

また、これらのモデルについて、指示文に対して適切な出力を行えるようにチューニング（Instruction tuning）したモデルを近日中に公開予定です。続報は@LINE_DEVをフォローしてお待ち下さい。

## AMD 平台上的 LLM 計算

Nvidia 在 GPU 上的各種運算這塊進來的很早，除了本家開發了很多工具以外，社群的支援度也很好。而 AMD 這邊就差了不少，但這也反應在顯卡的售價上面。