Question 1mediummultiple choice
Read the full Fundamentals of Large Language Models explanation →1Z0-1127 Fundamentals of Large Language Models • Complete Question Bank
Complete 1Z0-1127 Fundamentals of Large Language Models question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
```
oci ai language text-classification --text "The product is amazing!"
{
"data": {
"labels": [
{"name": "positive", "score": 0.98},
{"name": "negative", "score": 0.01},
{"name": "neutral", "score": 0.01}
]
}
}
```{
"compartmentId": "ocid1.compartment.oc1..example",
"definedTags": {},
"description": "Allow group GenAIUsers to call generative-ai-family in compartment",
"freeformTags": {},
"id": "ocid1.policy.oc1..example",
"name": "genai-policy",
"state": "ACTIVE",
"statements": [
"Allow group GenAIUsers to use generative-ai-family in compartment ExampleCompartment"
]
}Refer to the exhibit.
# OCI CLI output from `oci generative-ai model list`
{
"data": [
{
"id": "ocid1.generativeaimodel.oc1..aaaaaa...",
"model-name": "cohere.command",
"capabilities": ["chat", "text-generation"],
"context-window": 4096
},
{
"id": "ocid1.generativeaimodel.oc1..bbbbbb...",
"model-name": "cohere.base",
"capabilities": ["text-generation"],
"context-window": 8192
},
{
"id": "ocid1.generativeaimodel.oc1..cccccc...",
"model-name": "cohere.embed",
"capabilities": ["embeddings"],
"context-window": null
}
]
}Refer to the exhibit. # OCI IAM policy for accessing generative AI models Allow group GenAIDevelopers to use generative-ai-model-family in compartment ProdCompartment Allow group GenAIDevelopers to read generative-ai-model in compartment ProdCompartment Allow group GenAIDevelopers to create generative-ai-inference in compartment ProdCompartment
Refer to the exhibit.
# Error from OCI Generative AI inference API
{
"code": "InferenceRequestTooLarge",
"message": "The prompt plus max_new_tokens exceeds the model's context length of 8192 tokens.",
"prompt_length": 6000,
"max_new_tokens": 4000
}IAM Policy: Allow group GenAI-Users to use generative-ai-family in compartment ABC where request.operation = 'TextGeneration'
{
"statement": "Allow group GenAIGroup to read generative-ai-models in compartment Production",
"resource": "oci-generativeai:model",
"compartment": "Production"
}oci generative-ai inference chat \
--endpoint https://inference.generativeai.us-chicago-1.oci.oraclecloud.com \
--model-id "cohere.command" \
--compartment-id "ocid1.compartment.oc1..example" \
--messages '[{"role":"user","content":"Explain quantum computing."}]' \
--temperature 0.7 \
--top-p 0.9 \
--max-tokens 500Error:
{
"code": "InvalidParameter",
"message": "The specified model 'my-custom-model' does not exist or you are not authorized to access it."
}Refer to the exhibit.
```
$ oci ai language text-classification --text "I love this product!" --endpoint https://language.oci.oraclecloud.com
{
"data": {
"text": "I love this product!",
"document-classification": [
{
"text": "I love this product!",
"labels": [
{
"name": "Positive",
"score": 0.98
},
{
"name": "Negative",
"score": 0.01
},
{
"name": "Neutral",
"score": 0.01
}
],
"version": "1.0"
}
]
}
}
```Refer to the exhibit.
```json
{
"compartmentId": "ocid1.compartment.oc1..example",
"modelId": "cohere.command",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the capital of France?"}
],
"maxTokens": 100,
"temperature": 0.7,
"topP": 0.9,
"frequencyPenalty": 0.0,
"presencePenalty": 0.0
}
```Refer to the exhibit.
```
$ oci ai language fine-tuning-job create \
--compartment-id ocid1.compartment.oc1..example \
--model-id cohere.command \
--training-dataset-uri "oci://bucket@namespace/train.jsonl" \
--validation-dataset-uri "oci://bucket@namespace/val.jsonl" \
--parameters '{"numEpochs": 5, "learningRate": 0.0001, "batchSize": 16}' \
--max-duration-in-minutes 600
```{
"compartmentId": "ocid1.compartment.oc1..aaaaaa...",
"servingMode": {
"modelId": "ocid1.generativeaimodel.oc1..aaaaaa...",
"servingType": "ON_DEMAND"
},
"inferenceRequest": {
"prompt": "Explain the transformer architecture.",
"maxTokens": 500,
"temperature": 0.7,
"topP": 0.9,
"frequencyPenalty": 0.0,
"presencePenalty": 0.0
}
}