Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added finmuse-deliverables/finmuse-radeon-demo.mp4
Binary file not shown.
165 changes: 165 additions & 0 deletions finmuse-deliverables/finmuse-radeon-source/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# FinMuse Radeon

FinMuse Radeon is a Track 1 multimodal content creation demo for financial customer product promotion and introduction services. It helps banks, securities firms, insurers and wealth management teams transform one product brief into scenario-based marketing copy, visual prompts, SVG posters, a landing page, voiceover text and compliance-aware metadata.

The project is designed to demonstrate how AMD Radeon GPU / ROCm can support local, stable and reproducible financial content generation workflows. The baseline code uses a standard-library rule engine so judges can run it anywhere; on an AMD ROCm environment the same commands automatically record the GPU detection path.

## 1. Project background

Financial institutions need to introduce products across many daily-life scenarios:

- Wealth management for commute, family planning and retirement review.
- Insurance product education for family health, accident protection and travel.
- Credit card and banking services for mobile payment, shopping and business use.
- Fund and investment education for portfolio review and risk awareness.
- Branch screens, mobile apps, relationship-manager presentations and social videos.

Traditional production is fragmented: product teams write briefs, marketing teams create copy, design teams create visuals, compliance teams review wording, and channel teams adapt the same idea repeatedly. FinMuse Radeon compresses this into a repeatable generation pipeline.

## 2. What the demo generates

For each financial product brief, the CLI generates:

- `variants.json`: scenario-based content variants.
- `poster-01.svg`, `poster-02.svg`, `poster-03.svg`: high-resolution 1280x720 SVG promotional cards.
- `landing-page.html`: product introduction landing page.
- `gpu-status.json`: AMD Radeon / ROCm detection result.
- `run-summary.json`: runtime, clarity score, stability score and diversity tags.
- `demo-report.md`: cross-run report summarizing clarity, stability and diversity.

## 3. Repository structure

```text
finmuse-radeon/
finmuse/
__init__.py
cli.py # command line interface
generator.py # financial content generation logic
gpu.py # AMD Radeon / ROCm detection helpers
examples/
wealth-card.json
insurance-family.json
outputs/
wealth-card/ # generated sample output
insurance-family/ # generated sample output
demo-report.md
gpu-status.json
scripts/
run_demo.sh
requirements.txt
README.md
```

## 4. Quick start

> The baseline demo has no mandatory third-party dependency.

```bash
cd finmuse-radeon
python -m finmuse.cli check-gpu
python -m finmuse.cli generate --brief examples/wealth-card.json --variants 3 --out outputs/wealth-card
python -m finmuse.cli generate --brief examples/insurance-family.json --variants 3 --out outputs/insurance-family
python -m finmuse.cli report --run outputs/wealth-card --run outputs/insurance-family --out outputs/demo-report.md
```

On this packaging machine, the recorded status is CPU fallback because `rocm-smi` and `rocminfo` are not available. The demo does not fake an AMD GPU result.

## 5. AMD Radeon GPU / ROCm validation commands

On a Linux machine with supported AMD Radeon GPU and ROCm installed, run:

```bash
rocm-smi
rocminfo | head -80
python -m finmuse.cli check-gpu --out outputs/gpu-status.json
python -m finmuse.cli generate --brief examples/wealth-card.json --variants 6 --out outputs/wealth-card-rocm
python -m finmuse.cli report --run outputs/wealth-card-rocm --out outputs/demo-report-rocm.md
```

Expected evidence in `gpu-status.json`:

```json
{
"rocm_smi_found": true,
"rocminfo_found": true,
"mode": "amd_rocm_gpu",
"devices": ["AMD Radeon ..."]
}
```

If PyTorch ROCm is installed, `gpu.py` also checks whether the HIP backend is available. The current baseline generator is lightweight; a production extension can replace the rule engine with LLM, diffusion, TTS and video models running through ROCm-enabled runtimes.

## 6. System architecture

```text
Financial Brief JSON
|
v
Brief Parser ----> Compliance Guardrails
| |
v v
Scenario Planner --> Variant Generator --> Quality Metrics
| |
v v
Visual Prompt Builder Copy / Voiceover Builder
| |
+-------> Asset Renderer: SVG posters + HTML landing page
|
v
Metadata + GPU Runtime Recorder
```

Key design choices:

- Financial-scenario planner maps products to life moments.
- Compliance guardrails avoid unrealistic return promises.
- Variant generator produces diverse scenes, tone words and channels.
- Quality metrics record clarity, stability and diversity.
- GPU recorder captures AMD Radeon / ROCm runtime evidence.

## 7. Model and algorithm design

The hackathon baseline uses deterministic generation so judges can reproduce results exactly:

- Seed creation from product brief hash.
- Scenario library by product type: wealth, insurance, credit, loan and fund.
- Tone library: premium, warm, youth and stable.
- Rule-based headline, subtitle, caption and voiceover templates.
- SVG/HTML rendering for visible multimodal assets.
- Clarity score and stability score for demo evaluation.
- Diversity tags to prove multi-scenario output coverage.

Production extension path:

- LLM for product-brief understanding and compliance rewriting.
- Diffusion model for financial-scene key visuals.
- TTS for relationship-manager narration.
- Video compositor for branch-screen and social-video formats.
- ROCm/HIP acceleration for local GPU inference.

## 8. Demo evidence generated in this package

The included sample run generated two product campaigns:

1. `Aurora Smart Wealth Card`
2. `Family Shield Plan`

Each campaign includes three content variants and reports:

- Average clarity score.
- Average stability score.
- Scenario and channel diversity tags.
- Runtime and hardware mode.

## 9. Limitations and honest GPU statement

This packaged environment does not expose AMD Radeon GPU or ROCm tools, so the included execution result is `cpu_fallback`. The source code is designed to detect and record AMD ROCm evidence when run on supported hardware. The demo video therefore shows:

- Actual command-line run in the current environment.
- Actual generated outputs from the packaged code.
- The exact AMD ROCm commands required for GPU validation.
- A clear note that no GPU result is fabricated in this environment.

## 10. License and compliance note

This is a hackathon prototype. Financial copy is for demonstration only and must be reviewed by qualified compliance and legal teams before real customer use.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"institution": "Radeon Trust Insurance",
"product_name": "Family Shield Plan",
"product_type": "insurance",
"target_audience": "young families and urban professionals",
"tone": "warm",
"channels": ["branch screen", "mobile app", "social video"],
"benefits": [
"life-stage protection explanation",
"family health and accident coverage story",
"advisor-assisted policy comparison"
],
"disclaimer": "Insurance coverage is subject to official policy terms and underwriting review."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"institution": "Aurora Bank",
"product_name": "Aurora Smart Wealth Card",
"product_type": "wealth",
"target_audience": "young professionals and mass affluent families",
"tone": "premium",
"channels": ["mobile app", "branch screen", "social short video"],
"benefits": [
"goal-based asset allocation introduction",
"one-stop banking and wealth management service",
"risk-aware portfolio education"
],
"disclaimer": "For demonstration only. Investment involves risk and requires suitability assessment."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.2.0"
45 changes: 45 additions & 0 deletions finmuse-deliverables/finmuse-radeon-source/finmuse/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from __future__ import annotations

import argparse
import json
from pathlib import Path

from .generator import build_report, generate_package
from .gpu import write_status


def _print_json(data):
print(json.dumps(data, ensure_ascii=False, indent=2))


def main(argv=None):
parser = argparse.ArgumentParser(prog="finmuse", description="FinMuse Radeon financial product multimodal demo")
sub = parser.add_subparsers(dest="command", required=True)

p_gpu = sub.add_parser("check-gpu", help="Detect AMD Radeon / ROCm runtime and write gpu-status.json")
p_gpu.add_argument("--out", default="outputs/gpu-status.json")

p_gen = sub.add_parser("generate", help="Generate financial product promotional assets")
p_gen.add_argument("--brief", required=True, help="Path to product brief JSON")
p_gen.add_argument("--variants", type=int, default=3)
p_gen.add_argument("--out", required=True, help="Output directory")

p_report = sub.add_parser("report", help="Build markdown report from one or more run directories")
p_report.add_argument("--run", action="append", required=True)
p_report.add_argument("--out", default="outputs/demo-report.md")

args = parser.parse_args(argv)
if args.command == "check-gpu":
Path(args.out).parent.mkdir(parents=True, exist_ok=True)
data = write_status(args.out)
_print_json(data)
elif args.command == "generate":
data = generate_package(args.brief, args.out, args.variants)
_print_json(data)
elif args.command == "report":
text = build_report(args.run, args.out)
print(text)


if __name__ == "__main__":
main()
Loading