Llama-3.3-70B

Llama-3.3-70B

Llama-3.3-70B-Instruct는 Meta의 최신 700억 파라미터 지시 튜닝 언어 모델로, Llama 3.1 대비 성능과 효율이 개선됐어요. 128K 토큰 컨텍스트 윈도우와 reasoning·코딩·다국어 작업 전반의 향상된 능력으로 SOTA 결과를 내면서도 프로덕션 배포에 적합한 접근성을 유지해요. AMD GPU(MI300X·MI325X·MI355X), Intel Arc Pro B-Series GPU(BMG), Intel Xeon CPU용 배포 설정에 최적화돼요.

출처: 문서

본문

1. Model Introduction

Llama-3.3-70B-Instruct는 Meta의 최신 700억 파라미터 지시 튜닝 언어 모델로, Llama 3.1 대비 성능과 효율이 개선됐어요. 128K 토큰 컨텍스트 윈도우와 reasoning·코딩·다국어 작업 전반의 향상된 능력으로 SOTA 결과를 내면서도 프로덕션 배포에 적합한 접근성을 유지해요.

주요 특징:

  • 향상된 성능: Llama 3.1 대비 지시 따르기·reasoning·작업 완료 개선
  • Tool Calling: 함수 호출과 tool 사용 시나리오 네이티브 지원
  • 다국어 지원: 8개 언어(영어, 독일어, 프랑스어, 이탈리아어, 포르투갈어, 힌디어, 스페인어, 태국어) 최적화
  • 확장 컨텍스트: 긴 문서와 복잡한 작업 처리를 위한 128K 토큰 컨텍스트 윈도우
  • 효율적 배포: 70B 파라미터로 AMD MI300X 단일 GPU 배포 가능

라이선스: Llama 3.3은 Llama 3.3 Community License로 배포돼요. 자세한 내용은 LICENSE를 참조하세요.

자세한 내용은 공식 Llama 모델 저장소를 참조하세요.

2. SGLang Installation

설치 지침은 공식 SGLang 설치 가이드를 참조하세요.

3. Model Deployment

이 섹션은 AMD GPU(MI300X, MI325X, MI355X), Intel Arc Pro B-Series GPU(코드네임: BMG (Battlemage))와 Intel Xeon CPU에 최적화된 배포 구성을 제공해요.

3.1 Interactive Configuration

상단의 Command Generator를 사용해 AMD GPU·Intel Arc Pro B-Series GPU·Intel Xeon CPU 설정에 맞는 배포 명령을 자동 생성하세요. 예시 기본 명령(MI300X, BF16, tool calling 켜짐):

python -m sglang.launch_server \
  --model-path meta-llama/Llama-3.3-70B-Instruct \
  --tp 1 \
  --tool-call-parser llama3 \
  --host 0.0.0.0 \
  --port 30000

XEON (CPU): --device cpu --disable-overlap-schedule --tp 6. BMG (Intel Arc Pro B-Series): --device xpu --tp 8. 그 외 AMD GPU는 --tp 1.

3.2 Configuration Tips

AMD GPU 배포:

  • 모든 AMD GPU(MI300X, MI325X, MI355X)는 BF16과 FP8 변형 모두 TP=1을 지원해요
  • FP8 모델 변형: AMD 최적화 amd/Llama-3.3-70B-Instruct-FP8-KV 사용
  • Tool Calling: 함수 호출을 위해 --tool-call-parser llama3으로 활성화
  • 더 높은 처리량: 선택적으로 TP=2나 TP=4로 처리량 증가 가능

Xeon CPU 배포:

SGLang CPU 서버 문서의 서빙 엔진 시작 섹션 Notes 부분을 참조해 TP(tensor parallel)와 NUMA 바인딩 설정을 잘 이해하세요.

4. Model Invocation

4.1 Basic Usage

기본 API 사용과 요청 예시는 다음을 참조하세요:

4.2 Advanced Usage

4.2.1 Tool Calling

Llama 3.3 70B Instruct는 네이티브 tool calling을 지원해요. 배포 중 tool parser를 켜세요:

python -m sglang.launch_server \
  --model-path meta-llama/Llama-3.3-70B-Instruct \
  --tool-call-parser llama3 \
  --tp 1 \
  --host 0.0.0.0 \
  --port 30000

Python 예시:

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:30000/v1",
    api_key="EMPTY"
)

# Define available tools
tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get the current weather for a location",
            "parameters": {
                "type": "object",
                "properties": {
                    "location": {
                        "type": "string",
                        "description": "The city name"
                    },
                    "unit": {
                        "type": "string",
                        "enum": ["celsius", "fahrenheit"],
                        "description": "Temperature unit"
                    }
                },
                "required": ["location"]
            }
        }
    }
]

# Make request
response = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct",
    messages=[
        {"role": "user", "content": "What's the weather in Tokyo?"}
    ],
    tools=tools,
    temperature=0.7
)

# Check for tool calls
message = response.choices[0].message
if message.tool_calls:
    tool_call = message.tool_calls[0]
    print(f"Function: {tool_call.function.name}")
    print(f"Arguments: {tool_call.function.arguments}")

Tool Call 결과 처리:

# After executing the function, send the result back
def get_weather(location, unit="celsius"):
    # Your weather API call here
    return f"The weather in {location} is 22°{unit[0].upper()} and sunny."

# Build conversation with tool result
messages = [
    {"role": "user", "content": "What's the weather in Tokyo?"},
    {
        "role": "assistant",
        "content": None,
        "tool_calls": [{
            "id": "call_123",
            "type": "function",
            "function": {
                "name": "get_weather",
                "arguments": '{"location": "Tokyo", "unit": "celsius"}'
            }
        }]
    },
    {
        "role": "tool",
        "tool_call_id": "call_123",
        "content": get_weather("Tokyo", "celsius")
    }
]

final_response = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct",
    messages=messages,
    temperature=0.7
)

print(final_response.choices[0].message.content)
# Output: "The current weather in Tokyo is 22°C and sunny. A perfect day!"

4.2.2 Long Context Processing

긴 문서 처리를 위해 128K 컨텍스트 윈도우를 활용하세요:

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:30000/v1",
    api_key="EMPTY"
)

# Example with long document
long_document = "..." * 10000  # Your long document here

response = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct",
    messages=[
        {"role": "user", "content": f"Summarize this document:\n\n{long_document}"}
    ],
    temperature=0.7,
    max_tokens=1000
)

print(response.choices[0].message.content)

5. Benchmarking

SGLang 벤치마킹 스위트로 다양한 워크로드 패턴의 모델 성능을 테스트하세요:

5.1 Basic Benchmark Command

python -m sglang.bench_serving \
  --backend sglang \
  --dataset-name random \
  --num-prompts 1000 \
  --random-input 1024 \
  --random-output 1024 \
  --max-concurrency 16

5.2 Adjusting Benchmark Parameters

입력/출력 길이: --random-input--random-output을 조정해 다양한 워크로드 패턴을 테스트하세요:

  • 짧은 대화: --random-input 1024 --random-output 1024
  • 긴 출력: --random-input 1024 --random-output 8192
  • 긴 입력: --random-input 8192 --random-output 1024

동시성 수준: --max-concurrency를 조정해 다양한 부하 시나리오를 테스트하세요:

  • 낮은 동시성(지연 시간 중심): --max-concurrency 1 --num-prompts 100
  • 중간 동시성(균형): --max-concurrency 16 --num-prompts 1000
  • 높은 동시성(처리량 중심): --max-concurrency 100 --num-prompts 2000

📚 추가 리소스