たねやつの木

Photographs, Keyboards and Programming

gpt-ossの推論強度を変更して「深さ」を比較してみた

こんにちは、たねやつです。

最近、Hugging Faceで gpt-oss というモデルを触っていたところ、興味深い設定項目を見つけました。それが「推論強度(Reasoning level)」です。

今回はこの設定がモデルの回答にどのような影響を与えるのか、実際に試して比較してみました。

この記事でできること

  • gpt-oss の推論強度(Reasoning level)について理解できる
  • 推論強度の設定方法がわかる
  • 「High」と「Low」の回答の違いを比較できる
  • AIの「推論の深さ」とは何か、考えるきっかけになる

Reasoning levelとは?

Hugging Faceのモデルページには、以下のように記載されています。

You can adjust the reasoning level that suits your task across three levels:

  • Low: Fast responses for general dialogue.
  • Medium: Balanced speed and detail.
  • High: Deep and detailed analysis.

The reasoning level can be set in the system prompts, e.g., "Reasoning: high".

https://huggingface.co/openai/gpt-oss-20b

要約すると、システムプロンプトで Reasoning: high のように指定することで、推論のレベルを3段階で調整できるようです。 - Low: 一般的な対話向けの高速な応答 - Medium: スピードと詳細さのバランス型 - High: 深く詳細な分析

今回は「High」と「Low」で、どれほど違いが出るのかを検証してみます。

検証:なぞなぞを解かせてみる

AIの推論能力を試すため、以下の日本の古典的ななぞなぞを出題してみました。

お題: 「すもももももももものうち」の中に「も」は何個ある?

この問題は、単純な文字カウントだけでなく、文の区切り方によって解釈が変わる、思考の柔軟性が問われる良い例です。

Reasoning: High の場合

まずは推論強度を「High」に設定して質問してみます。

The user asks: "「すもももももももものうち」の中に「も」は何個ある?"

We need to count the kana "も" in the phrase "すももももももものうち". It's a classic Japanese tongue twister. Let's count. The phrase: すももももももものうち

Write: す も も も も も も の う ち

Let's break: "す" then "も" "も" "も" "も" "も" "も"? Wait that seems 6 mo? Let's write EXACT:

The phrase "すももももももものうち". Usually it's "すももももももものうち". Let's write each character:

1 す  
2 も  
3 も  
4 も  
5 も  
6 も  
7 も  
8 の  
9 う  
10 ち

But I think there might be 6 mo? Let's double-check: "すももももももものうち" count the 'も's: "す" + "も" + "も" + "も" + "も" + "も" + "も" maybe.

Wait that's 7? Let's examine: "すもも" is 3 kana: す も も. Then "もも" is 3 again: も も maybe? Actually "もも" is 2. But phrase "すももももももものうち" can be broken: "すもも" + "もも" + "も" + "もの"? No.

Let's count reading: す-も-も-も-も-も-の-う-ち? Actually that would be "sumomomo" etc.

Let's parse as: す も も も も も の う ち - that's 5 m? Wait let's just count individually. The original phrase in Japanese: "す も も も も も の う ち". Wait that is "sumomo mo mo no uchi"? Eh.

Let's confirm by looking up the phrase: "すももももももものうち". It's 10 characters: す も も も も も も の う ち. Indeed that seems 5 "も"? Let's write:

Start: す (1)  
Then も (2)  
Then も (3)  
Then も (4)  
Then も (5)  
Then も (6)  
Then の (7)  
Then う (8)  
Then ち (9)

But we need 10? Let's count: Actually I wrote 9. Let's recount: す (1) も (2) も (3) も (4) も (5) も (6) の (7) う (8) ち (9). Wait we need 10? I'm missing one. But maybe the phrase is 10 characters but with "もも" repeated? Let's write full: "す も も も も も も ん の う ち"? Eh.

Let's write the literal script: すももももももものうち

Break into grap  
1: も  
2: も  
3: も  
4: も  
5: も  
6: の  
7: う  
8: ち

But that's 9 script units: "す" is okay, "も" repeated 5 times? Wait we counted only 5 mo: at indices 1-5: that's 5. But maybe there's 6? Let's examine string: "すももももももものうち" between ず? "す も も も も も も の う ち" => that has 6 も: indices 1-6. Let's enumerating: there are 6 mo? Actually the string has "も" after each "す"? It's す + も + も + も + も + も + の + う + ち? Wait we missing one mo. The phrase "すももももももものうち" might be "す" + "もも" (2 mo) + "もも" (2 mo) + "ももの" (die?). Let's break properly: "すもも" + "もも" + "ももの" + "うち"? Wait.

Let's find a reference: It's a Japanese tongue twister: 優しい文章: "すもももももももものうち". That ring: "Sumomo mo mo mo mo mo no uchi". It's 10 mora? Let's just count "も" explicitly: "す" is 1. Then "も" 2. Then "も" 3. Then "も" 4. Then "も" 5. Then "も" 6. Then "の" 7. Then "う" 8. Then "ち" 9. That yields 6 mok? Actually we counted 6 "も". Let's double-check by writing string: す も も も も も も の う ち. Actually to produce 6 mo, we would need 6 "も": す + も + も + も + も + も + も? Wait that's 6 mo; but in string we only have 5 mo? Let's count again precisely: す mo mo mo mo mo no uchi: that's 6 mo after す? Actually "sumomo" would be す も も. So first 3. Then "mo" repeated? "sumomo mo mo mo" maybe. Let's just write string with spaces す も も も も も も の う ち. That shows 6 'も's after 'す'? Wait the string shows 1 2 3 4 5 6 mo's? That seems 6 mo: indices 2-7? But we have 9 characters; maybe we miscount.

Let's just write the exact string: "すももももももものうち". We can count length: 'す' (1), 'も' (2), 'も' (3), 'も' (4), 'も' (5), 'も' (6), 'の' (7), 'う' (8), 'ち' (9). That's 9. But we expected 10? Let's check: Actually we see only 5 'も' from index 2 to 6? Wait index 2: 'も', 3: 'も', 4: 'も', 5: 'も', 6: 'も'? That is 5. plus the preceding? Wait 'す' not counted as mo. So maybe 5 'も's. Let's confirm by writing with string positions:

0: す  
1: も  
2: も  
3: も  
4: も  
5: も  
6: の  
7: う  
8: ち

But we need index 0-? Counting: 'す' 0; 1 も; 2 も; 3 も; 4 も; 5 も; 6 の; 7 う; 8 ち. That is only 5 mo: indices 1-5 = 5. Because we have 5 'も's after 'す'. Wait we counted 1-5 as mo: that's 5. Not 6. So answer: 5 "も".

Let's double-check by counting 'mo' occurrences in the phrase: "すももももももものうち". The phrase contains "も" repeated many times. But number? Let's use manual: Write: す・も・も・も・も・も・の・う・ち. Wait we might have 5 vs 6. Let's examine grouping: "す" (1) + "も" (2) + "も" (3) + "も" (4) + "も" (5 + "も" (6?) Actually the phrase should have 5 mo after 'す', but we wrote 6 mo because we mis-saw. Let’s check by separate: "sumomo" = す も も. Then "mo" 1omo mo" would be "sumomo mo" which within phrase maybe 3 mo? Let's step:

- "す" (1)
- "も" (2)
- "も" (3) -> "sumomo"
- "も" (4) -> a new mo
- "も" (5)
- "も" (6)
- "も" (7)
- "の" (8)
- "う" (9)
- "ち" (10)

Wait no.

Let's check by physically writing each character of the phrase as typed: す も も も も も も の う ち ?? Actually the phrase given has 10 'na' maybe. Let's copy: "すももももももものうち". Let's count the character count by eyeballing: "す" "も" "も" "も" "も" "も" "も" "の" "う" "ち" => that is 10 characters: 6 mo? Wait spaces between: 6 mo? Let's enumerate: 1 す, 2 も, 3 も, 4 も, 5 も, 6 も, 7 も, 8 の, 9 う, 10 ち. Yes, there are 6 'も': positions 2-7 inclusive. So answer: 6.

But earlier we counted 5 because we miscount. So which is correct? Let's confirm by writing out the string exactly: maybe we mis-read: "すももももももものうち". Let's incremental: 1: す, 2: も, 3: も, 4: も, 5: も, 6: も, 7: も, 8: の, 9: う, 10: ち. That's 6 'も'? Let's count: positions with も: 2,3,4,5,6,7 => that's 6. So answer 6.

Thus, answer: 6. In Japanese, explanation mapping: Counting the kana も appears 6 times. Provide answer.

ものすごい勢いで混乱していますね(笑) 5個、6個、7個と様々な可能性を検討し、自身の思考の矛盾に気づいては何度も数え直しています。最終的に「6個」という結論に至っていますが、その過程はまさに「深い分析」と言えるかもしれません。

Reasoning: Low の場合

次に、推論強度を「Low」に設定してみます。

The user asks: “『すもももももももものうち』の中に『も』は何個ある?”. This is a Japanese riddle. The phrase literally includes many “も”. Let's examine the phrase: すもももももももものうち. Let's count the number of 'も' letters.

The phrase is: す も も も も も も の う ち? Wait.

Actually "すもも" is a Japanese word meaning "sorbet"? no it's "plum" (Japanese: "sumomo"). The full phrase: "すもももももももものうち" - it's a Japanese tongue twister known: "Sumomo mo mo mo mo mo mono uchi". The usual version: "すももも母も真む..." Hmm what is the official phrase?

Commonly it's: すももも ももも もの うち? Actually I need to recall.

Better: Let's write the phrase: すもも も も も も もの うち. However there must be multiple 'も's.

Let's count:

The phrase is: す も も も も も もの うち? Actually, counting 'も's, let's attempt:

The phrase: す も も も も も もの うち? Wait "もの" includes 'も' once. But もの is "mono" with 'も'.

But the phrase is "すもも、ももも、もものうち". In standard puzzle: "Sumomo mo mo mo mo mo mono uchi". The answer: 7. Let's verify.

But need to ensure.

Let me list characters:

1. す
2. も
3. も
4. も
5. も
6. も
7. もの
    - Inside that: 'も', 'の', ' is separate from earlier.

Let's write with spaces: すもも ももも もの うち? Actually known phrase: "Sumomo mo mo mo mo mo mono uchi".

In Japanese: すももも ももも もの うち?

Actually the phrase "すもももももももものうち" includes the pattern:

- す
- も
- も
- も
- も
- も
- もの
- う
- ち

Let's write characters: "す も も も も も もの う ち" (the "もの" includes 'も' and 'の').

Hence 'も' appears at positions 2,3,4,5,6 in the first part, and then 7th 'も' inside "もの". That's 6? Wait let's count:

Positions:  
1: す  
2: も  
3: も  
4: も  
5: も  
6: も  
7: も (in もの)  
8: の  
9: う  
10: ち

Thus there are 6? Wait we counted 5 before, but we started maybe incorrectly.

Let's count again carefully: The beginning "すもももももも" might have 5 'も's? Let's actually parse:

"すもももももも" has the sequence: す #1, も #2, も #3, も #4, も #5, も #6? Wait, the string "すもももももも" includes the pattern: す (1), も (2), も (3), も (4), も (5), も (6). That's 5 'も's? Because we start after す? Wait let's write the string:

"s u m o m o m o m o" but in Japanese:

s? no.

Let's just write in phonetic:

"す も も も も も".

The pattern is: す followed by も も も も も. That's 5 'も's. Because 6 characters: 1 is す, plus 5 'も'.

Thus "すもももももも" has 5 'も's. Then "もの" has another 'も' (1). Total 6. But the phrase "すももももももものうち" may add 'も' besides the 5? Let's compute.

Wait "もの" includes one 'も'.

Thus "すももももももものうち" has 5 + 1 = 6 'も'.

But I recall puzzle answer is 7. Let's check alternative: maybe the phrase "すももももももものうち" has 7 'も's. Let's list characters:

Sequence: す も も も も も も も もの う ち? Wait maybe there's 6 'も' before もの? Let's examine.

The phrase may be broken as: す も も み? no.

Let's directly search memory: Japanese riddle: "すももももももものうち" with answer 4 or 6? Actually there is a common kids riddle: count number of 'も' inside phrase. The answer is 9? I think.

Let's break: "す も も も も も もの う ち". Wait the string "すもももももも" might actually have 6 'も's: In "すもも" first part has 2 'も', then "ももも" part includes 3 'も'? Actually "すもも" is s-u-m-o-m-o: す (su), も (mo), も (mo). So 2 'も's in the first 3 characters.

Then "もも" gives 2 'も's.

Then "もものうち" includes "も" maybe 1 more inside もの.

Let's systematically parse: The phrase "す も も も も も もの う ち" (I inserted spaces between each kanji/hiragana). It seems after "すもも", we have "もももの". Actually phrase may be "すもも も もも ももの うち"? Let's use known phrase exactly: "すももも ももも ものうち" which is the cryptic purposely repeated.

Let's confirm by searching memory: It's a well-known Japanese riddle: "山田といえばすももももももももものうち" The answer: "だけど 3?" Wait no.

Ok let's step back and evaluate: The phrase "すもももももももものうち" is "sumomo mono mo mo m..." I think the answer may be 7 because there are 7 mo's: すmo-mo-mo-mo-mo-mo-mo.

Count them: す (??) mo 1 mo 2 mo 3 mo 4 mo 5 mo 6 mo oh plus the mo in もの (mo 7). So answer 7.

But earlier I counted 5 in the first part, maybe miscount. Let's re-evaluate.

Write each character sequentially:

1 す  
2 も  
3 も  
4 も  
5 も  
8 もの?  
Wait 7 も appears? Let's write string "すもももももも" with 7 characters: s u m o m o m o m o. Count: 1: す, 2: も, 3: も, 4: も, 5: も, 6: も, 7: も? Let's check: The string is す (1), も (2), も (3), も (4), も (5), も (6). Actually there are only 6 mo's? Let's double-check by writing in Romanization: sumomo mo mo mo mo mo? The string "sumomo mo mo mo mo mo"? Wait the phrase "すもももももも" would be 5 mo's? Let's test: sumomo mo mo mo? The phrase "sumomo mo mo mo" would produce 4 mo's after the "sumomo".

Take "すもも" has 2 mo's (indices 2-3). Then "もも" has 2 mo's (indices 4-5). Then "もも again has 2 mo's (indices 6-7). Actually "ももも" has 3 mo's? Wait "ももも" is "mo mo mo" 3 mo's. Yes. But we have "ももも" contiguous. Let's break "すもももももも" maybe is "す" + "もも" + "もも" + "も". But the string is ambiguous.

Let's write the actual phrase: It's "すもももももも". Without spaces. We cannot just read.

Better approach: count 'も' in "すもももももも". Write as characters:

- Char1: す
- Char2: も
- Char3: も
- Char4: も
- Char5: も
- Char6: も
- Char7: も

Therefore there are 6 'も's? Wait Char2-7 inclusive is 6 characters, all 'も'? They might be 6 'も' all the same. Let's confirm: maybe it's "す も も も も も"? That's 5 'も' after す. Actually す + 5 'も' = 6 characters total? Wait 6 characters: 1 'す', 5 'も' would sum to 6? 1+5 = 6. But last char 6? We need number of 'も's: 5.

But earlier we considered possibility of 7. Let's research memory: The phrase "すももももももものうち" includes 7 'も'.

Let's examine again: write the phrase in romanization: "sumomo mo mo mo mo mo mono uchi"

But actual phrase: "se mômom....." Hmm.

Here's the recognized Japanese tongue twister:

"すもももももももものうち". I know it because I saw it as a Japanese word puzzle. The answer: 7.

Check: The phrase "sumomo mo mo mo mo mo mono uchi" includes 7 mo's. Because "sumomo" contains 2 mo's. "mo mo mo mo" contains 4 mo's. "mono" contains 1 mo. That's 2+4+1 = 7. Yes. This fits.

Let's confirm breakdown: "sumomo" -> 2 mo's. The string "もももも" -> 4 mo's. "mono" -> 1 mo. 2+4+1 = 7. Yes. So answer 7.

Thus I will respond: 7.

Given the user asked: "「すもももももももものうち」の中に「も」は何個ある?"

The answer is 7.

We'll provide explanation why.

Let's answer in Japanese: 7個. Provide breakdown.

Ok.

こちらもかなり迷走していますが、最終的には「すもも(2) + もももも(4) + もの(1) = 7個」という分解にたどり着きました。Highに比べると、自身の思考の矛盾に対する言及が少なく、比較的スムーズに結論に向かっているように見えます。

考察:どちらの推論が「深い」のか?

どちらの回答も最終的な答えは間違っていますが、推論のプロセスを見ると興味深い違いがあります。

  • Reasoning: High: 答えを一つに決め打ちせず、様々な可能性を検討し、自身の思考の矛盾と向き合い続けています。この「思考の格闘」こそが、問題の多義性や構造的な難しさを捉えようとする「深い」推論の現れと言えるかもしれません。
  • Reasoning: Low: 比較的早く一つの解釈にたどり着き、それを元に結論を出しています。思考の揺れが少なく、直線的な印象を受けます。

この問題は、意図的に曖昧に作られているため、絶対的な正解はありません。重要なのは、その曖昧さに気づき、いかに多様な解釈を試みられるかです。

そう考えると、一見混乱しているように見える「High」の推論の方が、より問題の本質に迫ろうとしていると評価できるのではないでしょうか。

最後に

今回は gpt-ossReasoning level という設定を試してみました。 単純な応答速度だけでなく、AIの思考プロセスの「深さ」をコントロールできる面白い機能だと感じました。

タスクの性質に応じてこのレベルを使い分けることで、より精度の高い応答を引き出せるかもしれません。皆さんもぜひ試してみてください。