
Multimodal AI with Llama 3.2 on Amazon Bedrock
This blog explores Meta's Llama 3.2 multimodal models on Bedrock, highlighting OCR, diagram analysis, predictive maintenance, and multimodal AI apps.
- OCR — Simple text extraction and extraction from nested structures
- Diagram analysis — Comparing molar mass versus boiling points and some fictitious organic compounds to demonstrate its capabilities beyond its training data
- Predictive maintenance — Detecting dents and repairs in cars from images
- Multi-modal RAG (Retrieval-Augmented Generation) — Allowing users to supply both text and images as input for querying, comparing, and analyzing data.
- Multimodal model - input text and image. Suitable for use cases requiring image analysis, document processing, and multimodal chatbots.
- Max tokens: 128K
- Languages: English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
br = session.client("bedrock-runtime", region_name=studio_region)
prompts = ["Command: Write an overview on abrasives, body fillers, glazes used for auto repair."]
text_prompts = []
for p in prompts:
text_prompts.append( {"text": p})
messages = [{"role": "user","content": [],}]
messages[0]["content"].extend(text_prompts)
inference_config={"maxTokens": 2048, "temperature": 1.0, "topP": 0.9}
response = br.converse(
modelId=meta_llama_model_id,
messages=messages,
inferenceConfig = inference_config
)
1
2
3
4
5
6
7
8
9
10
11
12
native_request = {
"prompt": "Command: Write an overview on abrasives, body fillers, glazes used for auto repair.",
"max_gen_len": 512,
"temperature": 0.5,
}
# Convert the native request to JSON.
request = json.dumps(native_request)
# Invoke the model with the request.
response = br.invoke_model(modelId=meta_llama_model_id, body=request)
response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
The image shows a car dashboard displaying various warning lights. The "SRS Malfunction Service Required" light is illuminated, indicating a problem with the vehicle's Supplemental Restraint System (SRS), also known as the airbag system.
**Possible Causes**
* A malfunction in the SRS system, such as a faulty airbag sensor or a issue with the airbag itself
* A loose or corroded electrical connection
* A short circuit in the SRS wiring harness
* An issue with the SRS computer or control module
**Recommended Actions**
* Have a professional mechanic inspect the vehicle and diagnose the problem
* Repair or replace any faulty components identified during the inspection
* Follow the manufacturer's recommendations for resetting the SRS system after repairs are made
**Importance of Prompt Action**
Ignoring the warning light can result in:
* A decrease in the effectiveness of the airbags in the event of an accident
* A risk of injury or death if the airbags do not deploy properly
* Further damage to the vehicle's electrical system
**Conclusion**
The illuminated "SRS Malfunction Service Required" light indicates a serious issue with the vehicle's airbag system. Prompt attention from a professional mechanic is crucial to ensure the safety of the occupants and prevent further damage to the vehicle.