百度 ERNIE 團隊宣佈推出其 ERNIE-4.5-300B-A47B,一個強大的開源大型語言模型,現已在SiliconFlow 平台上發布。
基於專家混合(Mixture-of-Experts,MoE)架構,該模型具有3000億個總參數,每個token激活47億參數。它在多個領域提供強大的性能,包括數學推理、精確計算和代碼生成,使其特別適合於數學計算和程序設計相關任務的應用。
SiliconFlow 提供:
推理加速:優化以實現更低的延遲和更高的吞吐量。
擴展上下文:128K token 上下文窗口。
成本優化定價:$0.29/M tokens(輸入)和 $1.15/M tokens(輸出)。
技術亮點
ERNIE-4.5-300B-A47B 在指令跟隨和知識運用方面的強大能力,可歸功於統一的獎勵系統,該系統包含精心設計的獎勵機制,以引導模型更好地解釋和遵循各種用戶指令和內部知識。
快速開始
直接在SiliconFlow playground上嘗試 ERNIE-4.5-300B-A47B 模型。
快速訪問 API
以下 Python 示例演示了如何使用 SiliconFlow 的 API 端點調用 ERNIE-4.5-300B-A47B 模型。欲了解更多規範,請參閱SiliconFlow API 文檔。
from openai import OpenAI
url = 'https://api.siliconflow.com/v1/'
api_key = 'your_api_key'
client = OpenAI(
base_url=url,
api_key=api_key
)
content = ""
reasoning_content = ""
messages = [
{"role": "user", "content": "Explain the concept of gravitational waves in Chinese?"}
]
response = client.chat.completions.create(
model="baidu/ERNIE-4.5-300B-A47B",
messages=messages,
stream=True,
max_tokens=4096,
extra_body={
"thinking_budget": 1024
}
)
for chunk in response:
if chunk.choices[0].delta.content:
content += chunk.choices[0].delta.content
if chunk.choices[0].delta.reasoning_content:
reasoning_content += chunk.choices[0].delta.reasoning_content
messages.append({"role": "assistant", "content": content})
messages.append({'role': 'user', 'content': "Continue"})
response = client.chat.completions.create(
model="baidu/ERNIE-4.5-300B-A47B",
messages=messages,
stream=True
)from openai import OpenAI
url = 'https://api.siliconflow.com/v1/'
api_key = 'your_api_key'
client = OpenAI(
base_url=url,
api_key=api_key
)
content = ""
reasoning_content = ""
messages = [
{"role": "user", "content": "Explain the concept of gravitational waves in Chinese?"}
]
response = client.chat.completions.create(
model="baidu/ERNIE-4.5-300B-A47B",
messages=messages,
stream=True,
max_tokens=4096,
extra_body={
"thinking_budget": 1024
}
)
for chunk in response:
if chunk.choices[0].delta.content:
content += chunk.choices[0].delta.content
if chunk.choices[0].delta.reasoning_content:
reasoning_content += chunk.choices[0].delta.reasoning_content
messages.append({"role": "assistant", "content": content})
messages.append({'role': 'user', 'content': "Continue"})
response = client.chat.completions.create(
model="baidu/ERNIE-4.5-300B-A47B",
messages=messages,
stream=True
)from openai import OpenAI
url = 'https://api.siliconflow.com/v1/'
api_key = 'your_api_key'
client = OpenAI(
base_url=url,
api_key=api_key
)
content = ""
reasoning_content = ""
messages = [
{"role": "user", "content": "Explain the concept of gravitational waves in Chinese?"}
]
response = client.chat.completions.create(
model="baidu/ERNIE-4.5-300B-A47B",
messages=messages,
stream=True,
max_tokens=4096,
extra_body={
"thinking_budget": 1024
}
)
for chunk in response:
if chunk.choices[0].delta.content:
content += chunk.choices[0].delta.content
if chunk.choices[0].delta.reasoning_content:
reasoning_content += chunk.choices[0].delta.reasoning_content
messages.append({"role": "assistant", "content": content})
messages.append({'role': 'user', 'content': "Continue"})
response = client.chat.completions.create(
model="baidu/ERNIE-4.5-300B-A47B",
messages=messages,
stream=True
)ERNIE-4.5-300B-A47B 是尋求先進自然語言理解和生成能力的開發者和研究人員的最佳選擇。憑藉其在泛化、推理和編碼任務中的強大性能,該模型非常適合用於構建智能應用程序和探索創新用例。它使團隊能夠快速部署具有尖端語言能力的生產就緒解決方案。
立即開始使用 ERNIE-4.5-300B-A47B 在SiliconFlow上進行構建!