

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Writer AI Palmyra 모델
<a name="model-parameters-writer-palmyra"></a>

이 섹션에서는 Writer AI 모델에 대한 요청 파라미터 및 응답 필드에 대해 설명합니다. 이 정보를 사용하여 [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) 및 [InvokeModelWithResponseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html)(스트리밍) 작업으로 Writer AI 모델에 대한 추론 직접 호출을 수행합니다. 이 섹션에는 Writer AI 모델을 직접 호출하는 방법을 보여주는 Python 코드 예제도 포함되어 있습니다. 추론 작업에서 모델을 사용하려면 해당 모델의 모델 ID가 필요합니다. 모델 ID를 가져오려면 [Amazon Bedrock에서 지원되는 파운데이션 모델](models-supported.md) 섹션을 참조하세요. 일부 모델은 [Converse API](conversation-inference.md)에서도 작동합니다. Converse API가 특정 Writer AI 모델을 지원하는지 확인하려면 [지원되는 모델 및 모델 기능](conversation-inference-supported-models-features.md) 섹션을 참조하세요. 더 많은 코드 예제는 [AWS SDKs를 사용하는 Amazon Bedrock의 코드 예제](service_code_examples.md) 섹션을 참조하세요.

Amazon Bedrock의 파운데이션 모델은 모델마다 다른 입력 및 출력 양식을 지원합니다. Writer AI 모델이 지원하는 양식을 확인하려면 [Amazon Bedrock에서 지원되는 파운데이션 모델](models-supported.md) 섹션을 참조하세요. Writer AI 모델이 지원하는 Amazon Bedrock 기능을 확인하려면 [Amazon Bedrock에서 지원되는 파운데이션 모델](models-supported.md) 섹션을 참조하세요. Writer AI 모델을 사용할 수 있는 AWS 리전을 확인하려면 [Amazon Bedrock에서 지원되는 파운데이션 모델](models-supported.md) 섹션을 참조하세요.

Writer AI 모델로 추론 직접 호출을 수행할 때 모델에 대한 프롬프트를 포함해야 합니다. Amazon Bedrock이 지원하는 모델에 대한 프롬프트를 만드는 방법의 일반적인 내용은 [프롬프트 엔지니어링 개념](prompt-engineering-guidelines.md) 섹션을 참조하세요. Writer AI 한정 프롬프트 정보는 [Writer AI 프롬프트 엔지니어링 안내서]()를 참조하세요.

**Writer Palmyra X4**

Stanford HELM에서 가장 높은 순위를 받은 Writer Palmyra X4는 복잡한 태스크 및 에이전트 워크플로에서 우수한 성능을 달성합니다. 128,000개의 토큰 컨텍스트 창을 고급 추론, 도구 직접 호출, LLM 위임, 내장 RAG, 코드 생성, 구조화된 출력, 다중 모달리티 및 다국어 지원을 비롯한 엔터프라이즈급 기능 제품군과 결합합니다. 모델이 조치를 취하는 능력을 확장하는 엔터프라이즈별 도구를 사용하는 Palmyra X4를 사용하면 개발자가 시스템을 업데이트하고, 트랜잭션을 수행하고, 이메일을 보내고, 워크플로를 트리거하는 등의 앱과 에이전트를 구축할 수 있습니다.

**Writer Palmyra X5**

토큰 컨텍스트 기간이 100만 개인 경우 Writer Palmyra X5는 앱 및 에이전트 개발을 위한 컨텍스트 제약 조건의 끝을 표시합니다. 라이터의 최신 모델은 확장된 메모리와 처리 능력을 통해 긴 컨텍스트 추론에서 우수한 성능을 달성하므로 개발자는 더 복잡한 다단계 에이전트 워크플로를 더 빠르게 구축할 수 있습니다. Palmyra X4와 마찬가지로, Palmyra X5에는 고급 추론, 도구 호출, LLM 위임, 내장 RAG, 코드 생성, 구조화된 출력, 다중 모달리티 및 다국어 지원을 비롯한 엔터프라이즈 지원 기능 제품군이 포함되어 있습니다.

**Topics**
+ [Writer Palmyra X4](model-parameters-palmyra-x4.md)
+ [Writer Palmyra X5](model-parameters-palmyra-x5.md)

# Writer Palmyra X4
<a name="model-parameters-palmyra-x4"></a>

Writer Palmyra X4는 컨텍스트 기간이 최대 128,000개의 토큰인 모델입니다. 이 모델은 복잡한 태스크를 처리하고 이해하는 데 뛰어나므로 워크플로 자동화, 코딩 태스크 및 데이터 분석에 적합합니다.
+ 공급자 - Writer
+ 범주 - 텍스트 생성, 코드 생성, 풍부한 텍스트 형식 지정
+ 마지막 버전 - v1
+ 릴리스 날짜 - 2025년 4월 28일
+ 모델 ID - `writer.palmyra-x4-v1:0`
+ 형식 - 텍스트
+ 최대 토큰 - 입력: 토큰 122,880개, 출력: 토큰 8,192개
+ 언어 - 영어, 스페인어, 프랑스어, 독일어, 중국어 및 기타 여러 언어
+ 배포 유형 - 서버리스

## Palmyra X4 간접 호출 요청 본문 필드
<a name="model-parameters-palmyra-x4-request-body"></a>

Writer 모델을 사용하여 [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) 또는 [InvokeModelWithResponseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html) 직접 호출을 수행할 경우, 아래 항목을 준수하는 JSON 객체로 `body` 필드를 채웁니다. `text_prompts` 객체의 `text` 필드에 프롬프트를 입력합니다.

```
{
"modelId": "writer.palmyra-x4-v1:0",
"contentType": "application/json",
"accept": "application/json",
"body": "{\"messages\":[{\"role\":\"user\",\"content\":{\"text\":\"Explain quantum computing in simple terms\"}}]}"
}
```

아래 표에는 숫자 파라미터의 최소값, 최대값, 기본값이 나와 있습니다.


****  

| 파라미터 | 유형 | Default | 범위/검증 | 설명 | 
| --- | --- | --- | --- | --- | 
| messages | array | 필수 | 1-∞ 항목 | 채팅 기록 메시지 | 
| temperature | float | 1.0 | 0.0 ≤ x ≤ 2.0 | 샘플링 온도 | 
| top\$1p | float | 1.0 | 0.0 < 값 ≤ 1.0 | Nucleus 샘플링 임계값 | 
| max\$1tokens | int | 16 | 1 ≤ x ≤ 8192 | 생성할 최대 토큰 수 | 
| min\$1tokens | int | 0 | 0 ≤ x ≤ max\$1tokens | 중지 전 최소 토큰 | 
| 중단 | array | [] | ≤4 항목 | 중지 시퀀스 | 
| 시드 | int | null | 모든 정수 | Random seed(임의 시드) | 
| presence\$1penalty | float | 0.0 | -2.0 ≤ x ≤ 2.0 | 새 토큰 존재 페널티 | 
| frequency\$1penalty | float | 0.0 | -2.0 ≤ x ≤ 2.0 | 토큰 빈도 페널티 | 

## Palmyra X4 간접 호출 응답 본문 필드
<a name="model-parameters-palmyra-x4-response-body"></a>

Writer Palmyra X4에 대한 응답 JSON은 다음 형식을 사용합니다.

```
{
  "id": "chatcmpl-a689a6e150b048ca8814890d3d904d41",
  "object": "chat.completion",
  "created": 1745854231,
  "model": "writer.palmyra-x4-v1:0",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "reasoning_content": null,
        "content": "Quantum computing harnesses quantum mechanics to process information in extraordinarily powerful ways. Unlike classical bits, which are 0 or 1, quantum bits (qubits) can exist in multiple states simultaneously through superposition. Qubits also entangle, allowing them to be interconnected in such a way that the state of one (whether it's 0 or 1) can depend on the state of another, no matter the distance between them. This combination of superposition and entanglement enables quantum computers to solve complex problems much faster than classical computers, particularly in areas like cryptography, optimization, and simulations of molecular structures. However, quantum computing is still in its early stages, facing challenges in stability and scalability.",
        "tool_calls": []
      },
      "logprobs": null,
      "finish_reason": "stop",
      "stop_reason": null
    }
  ],
  "usage": {
    "prompt_tokens": 43,
    "total_tokens": 186,
    "completion_tokens": 143,
    "prompt_tokens_details": null
  },
  "prompt_logprobs": null
}
```

## Writer Palmyra X4 예제 코드
<a name="model-parameters-palmyra-x4-example-code"></a>

Writer Palmyra X4 코드 예제:

```
import boto3
import json
from botocore.exceptions import ClientError

client = boto3.client("bedrock-runtime", region_name="us-west-2")
model_id = "writer.palmyra-x4-v1:0"

# Format the request payload using the model's native structure.
native_request = {
    "temperature": 1,
    "messages": [
        {
            "role": "user",
            "content": "Explain quantum computing in simple terms.",
        }
    ],
}

# Convert the native request to JSON.
request = json.dumps(native_request)

try:
    # Invoke the model with the request.
    response = client.invoke_model(modelId=model_id, body=request)
except (ClientError, Exception) as e:
    print(f"ERROR: Can't invoke '{model_id}'. Reason: {e}")
    exit(1)

# Decode the response body.
model_response = json.loads(response["body"].read())

# Extract and print the response text.
response_text = model_response["content"][0]["text"]
print(response_text)
```

# Writer Palmyra X5
<a name="model-parameters-palmyra-x5"></a>

Writer Palmyra X5에는 고급 추론, 도구 직접 호출, LLM 위임, 내장 RAG, 코드 생성, 구조화된 출력, 다중 모달리티, 다국어 지원을 비롯한 엔터프라이즈 지원 기능 제품군이 포함되어 있습니다.

Writer Palmyra X5 모델에는 다음과 같은 제어 기능이 있습니다.
+ 공급자 - Writer
+ 범주 - 텍스트 생성, 코드 생성, 풍부한 텍스트 형식 지정
+ 마지막 버전 - v1
+ 릴리스 날짜 - 2025년 4월 28일
+ 모델 ID - `writer.palmyra-x5-v1:0`
+ 형식 - 텍스트
+ 최대 토큰 - 입력: 토큰 1,040,000개, 출력: 토큰 8,192개
+ 언어 - 영어, 스페인어, 프랑스어, 독일어, 중국어 및 기타 여러 언어
+ 배포 유형 - 서버리스

## Palmyra X5 간접 호출 요청 본문 필드
<a name="model-parameters-palmyra-x5-request-body"></a>

Writer 모델을 사용하여 [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) 또는 [InvokeModelWithResponseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html) 직접 호출을 수행할 경우, 아래 항목을 준수하는 JSON 객체로 `body` 필드를 채웁니다. `text_prompts` 객체의 `text` 필드에 프롬프트를 입력합니다.

```
{
"modelId": "writer.palmyra-x5-v1:0",
"contentType": "application/json",
"accept": "application/json",
"body": "{\"messages\":[{\"role\":\"user\",\"content\":{\"text\":\"Explain quantum computing in simple terms\"}}]}"
}
```

아래 표에는 숫자 파라미터의 최소값, 최대값, 기본값이 나와 있습니다.


****  

| 파라미터 | 유형 | Default | 범위/검증 | 설명 | 
| --- | --- | --- | --- | --- | 
| messages | array | 필수 | 1-∞ 항목 | 채팅 기록 메시지 | 
| temperature | float | 1.0 | 0.0 ≤ x ≤ 2.0 | 샘플링 온도 | 
| top\$1p | float | 1.0 | 0.0 < x ≤ 1.0 | Nucleus 샘플링 임계값 | 
| max\$1tokens | int | 16 | 1 ≤ x ≤ 8192 | 생성할 최대 토큰 수 | 
| min\$1tokens | int | 0 | 0 ≤ x ≤ max\$1tokens | 중지 전 최소 토큰 | 
| 중단 | array | [] | ≤4 항목 | 중지 시퀀스 | 
| 시드 | int | null | 모든 정수 | Random seed(임의 시드) | 
| presence\$1penalty | float | 0.0 | -2.0 ≤ x ≤ 2.0 | 새 토큰 존재 페널티 | 
| frequency\$1penalty | float | 0.0 | -2.0 ≤ x ≤ 2.0 | 토큰 빈도 페널티 | 

## Palmyra X5 간접 호출 응답 본문 필드
<a name="model-parameters-palmyra-x5-response-body"></a>

Writer Palmyra X5에 대한 응답 JSON은 다음 형식을 사용합니다.

```
{
  "id": "chatcmpl-a689a6e150b048ca8814890d3d904d41",
  "object": "chat.completion",
  "created": 1745854231,
  "model": "writer.palmyra-x5-v1:0",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "reasoning_content": null,
        "content": "Quantum computing harnesses quantum mechanics to process information in extraordinarily powerful ways. Unlike classical bits, which are 0 or 1, quantum bits (qubits) can exist in multiple states simultaneously through superposition. Qubits also entangle, allowing them to be interconnected in such a way that the state of one (whether it's 0 or 1) can depend on the state of another, no matter the distance between them. This combination of superposition and entanglement enables quantum computers to solve complex problems much faster than classical computers, particularly in areas like cryptography, optimization, and simulations of molecular structures. However, quantum computing is still in its early stages, facing challenges in stability and scalability.",
        "tool_calls": []
      },
      "logprobs": null,
      "finish_reason": "stop",
      "stop_reason": null
    }
  ],
  "usage": {
    "prompt_tokens": 43,
    "total_tokens": 186,
    "completion_tokens": 143,
    "prompt_tokens_details": null
  },
  "prompt_logprobs": null
}
```