设为首页收藏本站

爱吱声

 找回密码
 注册
搜索
查看: 68|回复: 0
打印 上一主题 下一主题

[工程技术] deepseek, Which number is larger, 9.11 or 9.8?

[复制链接]

该用户从未签到

跳转到指定楼层
楼主
 楼主| 发表于 4 小时前 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 nanimarcus 于 2025-2-2 19:41 编辑 ; J  e  A( K8 Z$ W6 _

& d& |6 C+ q7 n* g6 e8 }- r================
5 o: i: }! v2 J+ f% oNvidia NIM service, deepseek :
6 S5 ~% q8 @$ l$ [$ z: Y================
! J. h3 u" }5 Y. Q# r4 e7 Whttps://build.nvidia.com/deepseek-ai/deepseek-r1
+ T% x, E$ n4 q. D1 S1 ~! S5 M3 Q% w6 M) a) v7 ]) M- n

4 q: t3 f! B" ~! dfrom openai import OpenAI( `' P: I& Q9 [% s7 e
. A7 e% O4 r" Y5 a) m
client = OpenAI(
. H) m! }$ |/ b2 w! i  base_url = "https://integrate.api.nvidia.com/v1",
6 z4 Z9 e* {- U  t  api_key = "$API_KEY_REQUIRED_IF_EXECUTING_OUTSIDE_NGC"
2 l, b: B( N' G2 m)
' q2 P  S" d1 |9 n- f/ b5 \  o; i8 i: {
completion = client.chat.completions.create(* X7 N( l. {/ Y0 i, q  d7 `$ p
  model="deepseek-ai/deepseek-r1",7 K( T6 [! d7 M9 |( y& ~3 l! s, T
  messages=[{"role":"user","content":"Which number is larger, 9.11 or 9.8?"}],
+ G1 C$ Z6 j& u8 q" O  temperature=0.6,
! L) F1 ^; H& E2 m. m  top_p=0.7,! f) _: W0 u* d+ s  U- s
  max_tokens=4096,& B& T; ~, M& m% W; ]
  stream=True
# A- T" m( ^9 Z)- _) B; X8 A7 @6 V! X# s
" P9 E8 ~' h* U" n3 u- {' E9 i  z5 A
for chunk in completion:4 {% ]+ R; w/ O2 a
  if chunk.choices[0].delta.content is not None:
3 a0 \% M: h0 X: F    print(chunk.choices[0].delta.content, end="")
9 g9 r- P' O. I& j$ O0 `8 {: A  z# v. Z5 g' G4 P9 T; {# f$ O. K
================- a! q0 T# ?+ S9 [$ s! t5 r8 z
Chat Deepseek
2 t4 S  D1 y4 f7 V4 b================
0 v6 A; S! Z7 {8 X( K% H$ s. Q
2 T9 ^6 F, Z- X+ _/ k( w. q% q5 ]% tWhich number is larger, 9.11 or 9.8?
, {9 q! S8 n0 J  e+ ]1 L, V" V- l2 G; m/ S, I1 T2 f/ r
To determine which number is larger between 9.11 and 9.8, let's compare them step by step.
5 \7 S2 B5 b" h- j% ]( ~7 M" [$ P* A: }% [5 U; k1 B1 g
    Compare the Whole Number Parts:* W, h6 x& n# V" F
  T" i% b1 \0 e: m
        Both numbers have the same whole number part: 9.4 W. K. w) p+ k0 s
* F7 @' a/ L/ N1 W5 s5 U: j$ D
    Compare the Decimal Parts:2 |& U0 z" \6 @4 p7 K$ b7 A; p+ S5 X

- R) x; j% V. Y8 q5 v+ X        9.11 has a decimal part of 0.11.
( Z# s2 O3 O* J  \
7 L. S6 i( \) x4 T8 h3 X7 X. J        9.8 can be written as 9.80 to have the same number of decimal places., D6 _9 |$ z$ L/ H7 R, ^  i! C, L
3 a' ]3 Z0 r  e( F6 X" n4 d# y
        Now, compare 0.11 and 0.80:3 C2 o! F' T5 _8 N1 I: h9 |6 f
) o/ A- Z2 j# X
            0.80 is greater than 0.11.4 K3 f5 l3 S- D  m, b
4 K+ ?& N' L# D
    Conclusion:1 M: O* ~! W3 i; L7 m+ ~2 s9 o

0 F# Z" V. `: q! H        Since the decimal part of 9.8 is larger than that of 9.11, the entire number 9.8 is larger.
9 q* [$ ~3 g; ~: F) C* x# w! b  q3 x3 u3 Y# o* k0 Z/ W  e. E
9.8 is larger: K, h: z2 b6 y9 j8 v6 y% x

9 v; e! F7 F! z- i! y* Y================3 p* y0 h! h; c5 C5 H6 e7 p
Chat OpenAI, Reason
* m! I! [0 A9 a3 S/ R0 i================
# g" T* ?6 w; [; J: X' X. _
; ]# x  z8 U- YTo determine which number is larger, we compare the two numbers digit by digit:' u6 X  p& ~4 m; u% m

# u2 r; y2 z. y% c1. Both numbers have the same whole number part (9).
  A3 ]4 o1 J$ x0 s2. Next, look at the decimal parts:
, o, A' I  e! P- P   - For 9.11, the tenths digit is 1.
) I: K* i2 x5 [; a4 a! Y: Z0 t   - For 9.8, the tenths digit is 8 (which can be thought of as 9.80).
5 X' J& a* |, |8 g' ^, @! X4 U/ X3. Since 8 is greater than 1, 9.8 is larger than 9.11.* \* `( y8 e4 X
' c% _/ \+ O5 ?, g9 X+ y+ ~
Therefore, **9.8 is larger than 9.11**.; D/ l: t- S4 V' [' K: J

手机版|小黑屋|Archiver|网站错误报告|爱吱声   

GMT+8, 2025-2-2 22:51 , Processed in 0.034617 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表