Ring-2.6-1T
Ring-2.6-1T
Ring-2.6-1T은 InclusionAI가 공개한 오픈소스 트리리언 파라미터 추론 모델의 최신 버전이에요. Ring-2.5-1T에서 생성 효율, 하드웨어 친화성, 추론 능력을 한 단계 더 끌어올려, 1M 컨텍스트에서 탁월한 성능을 발휘하도록 설계됐어요. 허깅페이스(Hugging Face)에 걸린 모델은 FP16/FP8 정밀도로 사전 훈련과 사후 훈련이 모두 완료된 상태예요.
본문
1. 모델 소개
Ring-2.6-1T는 RHINO-2.6을 기반으로 구축되어 생성 효율과 성능을 개선했어요. 모델 경로는 inclusionAI/Ring-2.6-1T이고, 디폴트로 지정된 attention backend는 fused_linear_rlh예요.
2. SGLang 설치
설치 방법은 공식 SGLang 설치 가이드를 참고해 주세요.
pip install --upgrade sglang[all]
3. 모델 배포 (Model Deployment)
먼저 모델 가중치를 로컬에 다운로드하고, 적절한 양자화 값을 선택하세요. 여기서는 1/2 사이즈(nnstreamer의 양자화 버전)와 함께 8에서 32 사이의 TP 값을 사용하는 것을 권장해요.
sglang serve --model-path /your_model_path --tp 8 --host 0.0.0.0 --port 30000 --attention-backend fused_linear_rlh
또한, 모델을 서버에 배포할 때는 다음 하드웨어 구성이 필요해요.
4 × AMD MI300X 192GB(노드당 768GB VRAM)4 × AMD MI325X 192GB8 × NVIDIA H200 141GB8 × NVIDIA B200 / B300 / GB200 / GB3004 × NVIDIA B200 / B3002 × NVIDIA B200 / B300
4. 모델 호출 (Model Invocation)
배포가 완료되면 OpenAI 호환 API를 통해 모델을 호출할 수 있어요.
4.1 서버가 정상적으로 가동되는지 확인 (Server Up Check)
curl -s http://localhost:30000/v1/models | python3 -m json.tool
4.2 기본 사용법 (Basic Usage)
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:30000/v1",
api_key="EMPTY",
)
completion = client.chat.completions.create(
model="",
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(completion)
4.3 고급 사용법 (Advanced Usage)
4.3.1 긴 맥락 처리 (Long Context)
Ring은 1M 내지 더 긴 시퀀스에서도 일관된 성능을 제공하며, 아래 샘플에서는 30만 개 이상의 토큰을 사용해 모델의 긴 컨텍스트 처리 품질을 보여줘요.
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:30000/v1",
api_key="EMPTY",
)
completion = client.chat.completions.create(
model="",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Longest Law in the world"}
],
stream=True,
temperature=0.6,
top_p=0.9,
frequency_penalty=0.1,
max_tokens=16384,
)
print(completion)
4.3.2 Tool Calling (Bayesian Search)
Tool Calling을 통해 실제 검색 결과를 활용할 수 있어요. 아래 예시는 Bayesian search 도구를 정의해 사용하는 방식이에요.
import json
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:30000/v1",
api_key="EMPTY",
)
tools = [
{
"type": "function",
"function": {
"name": "bayesian_search",
"description": "Performs a web search ...",
"parameters": {
"type": "object",
"properties": {
"query": {"type": "string", "description": "The search query string."},
"top_n": {"type": "integer", "description": "The number of top results to fetch."},
"domain": {
"type": "array",
"description": "A list of domains to restrict the search to.",
"items": {"type": "string"},
},
},
"required": ["query"],
},
},
}
]
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the latest news on the Silicon Valley Bank collapse?"},
]
response = client.chat.completions.create(
model="",
messages=messages,
tools=tools,
tool_choice="auto",
temperature=0.6,
top_p=0.9,
frequency_penalty=0.1,
max_tokens=1024,
)
print(response.choices[0].message)
if response.choices[0].message.tool_calls:
tool_call = response.choices[0].message.tool_calls[0]
arguments = json.loads(tool_call.function.arguments)
print("=== Searching ===")
print(arguments)
5. 벤치마크 (Benchmarks)
아래는 Ring-2.6-1T를 검증한 벤치마크 결과예요.
==========================================
Benchmark: Single token latency
Additional inputs:
...
==========================================