Skip to content

log: refine log function for Android #6721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

zhouwg
Copy link
Contributor

@zhouwg zhouwg commented Apr 17, 2024

__ANDROID__ ||  ANDROID

are defined by Android NDK, not self-defined macro. so it will not bring side-effect to existing codes.

this PR is prepare for submit Qualcomm's QNN backend to upstream llama.cpp from "PoC: Add Qualcomm mobile SoC native backend for GGML,kantv-ai/kantv#121 ".

Copy link
Contributor

📈 llama.cpp server for bench-server-baseline on Standard_NC4as_T4_v3 for phi-2-q4_0: 440 iterations 🚀

Expand details for performance related PR only
  • Concurrent users: 8, duration: 10m
  • HTTP request : avg=10677.93ms p(95)=26271.62ms fails=, finish reason: stop=389 truncated=51
  • Prompt processing (pp): avg=117.89tk/s p(95)=519.77tk/s
  • Token generation (tg): avg=23.28tk/s p(95)=34.07tk/s
  • ggml-org/models/phi-2/ggml-model-q4_0.gguf parallel=8 ctx-size=16384 ngl=33 batch-size=2048 ubatch-size=256 pp=1024 pp+tg=2048 branch=refine-log-subsystem commit=8d4e096b09a9e124b8844456b3909200feb34cf7

prompt_tokens_seconds

More
---
config:
    xyChart:
        titleFontSize: 12
        width: 900
        height: 600
    themeVariables:
        xyChart:
            titleColor: "#000000"
---
xychart-beta
    title "llama.cpp bench-server-baseline on Standard_NC4as_T4_v3
 duration=10m 440 iterations"
    y-axis "llamacpp:prompt_tokens_seconds"
    x-axis "llamacpp:prompt_tokens_seconds" 1713347813 --> 1713348437
    line [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 357.41, 357.41, 357.41, 357.41, 357.41, 761.03, 761.03, 761.03, 761.03, 761.03, 602.06, 602.06, 602.06, 602.06, 602.06, 612.07, 612.07, 612.07, 612.07, 612.07, 639.38, 639.38, 639.38, 639.38, 639.38, 681.91, 681.91, 681.91, 681.91, 681.91, 679.29, 679.29, 679.29, 679.29, 679.29, 679.04, 679.04, 679.04, 679.04, 679.04, 688.42, 688.42, 688.42, 688.42, 688.42, 691.62, 691.62, 691.62, 691.62, 691.62, 692.21, 692.21, 692.21, 692.21, 692.21, 697.97, 697.97, 697.97, 697.97, 697.97, 699.03, 699.03, 699.03, 699.03, 699.03, 685.63, 685.63, 685.63, 685.63, 685.63, 711.08, 711.08, 711.08, 711.08, 711.08, 715.39, 715.39, 715.39, 715.39, 715.39, 737.08, 737.08, 737.08, 737.08, 737.08, 681.57, 681.57, 681.57, 681.57, 681.57, 688.95, 688.95, 688.95, 688.95, 688.95, 690.86, 690.86, 690.86, 690.86, 690.86, 689.68, 689.68, 689.68, 689.68, 689.68, 701.91, 701.91, 701.91, 701.91, 701.91, 699.77, 699.77, 699.77, 699.77, 699.77, 699.65, 699.65, 699.65, 699.65, 699.65, 697.7, 697.7, 697.7, 697.7, 697.7, 702.9, 702.9, 702.9, 702.9, 702.9, 704.18, 704.18, 704.18, 704.18, 704.18, 705.96, 705.96, 705.96, 705.96, 705.96, 657.86, 657.86, 657.86, 657.86, 657.86, 658.93, 658.93, 658.93, 658.93, 658.93, 661.05, 661.05, 661.05, 661.05, 661.05, 662.15, 662.15, 662.15, 662.15, 662.15, 627.12, 627.12, 627.12, 627.12, 627.12, 626.25, 626.25, 626.25, 626.25, 626.25, 626.76, 626.76, 626.76, 626.76, 626.76, 625.97, 625.97, 625.97, 625.97, 625.97, 631.0, 631.0, 631.0, 631.0, 631.0, 633.54, 633.54, 633.54, 633.54, 633.54, 633.02, 633.02, 633.02, 633.02, 633.02, 634.54, 634.54, 634.54, 634.54, 634.54, 637.68, 637.68, 637.68, 637.68, 637.68, 646.2, 646.2, 646.2, 646.2, 646.2, 651.05, 651.05, 651.05, 651.05, 651.05, 651.32, 651.32, 651.32, 651.32, 651.32, 638.79, 638.79, 638.79, 638.79, 638.79, 637.44, 637.44, 637.44, 637.44, 637.44, 638.31, 638.31, 638.31, 638.31, 638.31, 639.17, 639.17, 639.17, 639.17, 639.17, 640.97, 640.97, 640.97, 640.97, 640.97, 642.61, 642.61, 642.61, 642.61, 642.61, 650.62, 650.62, 650.62, 650.62, 650.62, 647.38, 647.38, 647.38, 647.38, 647.38, 638.92, 638.92, 638.92, 638.92, 638.92, 638.45, 638.45, 638.45, 638.45, 638.45, 637.34, 637.34, 637.34, 637.34, 637.34, 636.61, 636.61, 636.61, 636.61, 636.61, 635.89, 635.89, 635.89, 635.89, 635.89, 638.96, 638.96, 638.96, 638.96, 638.96, 641.72, 641.72, 641.72, 641.72, 641.72, 642.3, 642.3, 642.3, 642.3, 642.3, 644.77, 644.77, 644.77]
                    
Loading
predicted_tokens_seconds
More
---
config:
    xyChart:
        titleFontSize: 12
        width: 900
        height: 600
    themeVariables:
        xyChart:
            titleColor: "#000000"
---
xychart-beta
    title "llama.cpp bench-server-baseline on Standard_NC4as_T4_v3
 duration=10m 440 iterations"
    y-axis "llamacpp:predicted_tokens_seconds"
    x-axis "llamacpp:predicted_tokens_seconds" 1713347813 --> 1713348437
    line [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 23.88, 23.88, 23.88, 23.88, 23.88, 26.19, 26.19, 26.19, 26.19, 26.19, 24.32, 24.32, 24.32, 24.32, 24.32, 22.58, 22.58, 22.58, 22.58, 22.58, 24.17, 24.17, 24.17, 24.17, 24.17, 24.66, 24.66, 24.66, 24.66, 24.66, 24.86, 24.86, 24.86, 24.86, 24.86, 25.54, 25.54, 25.54, 25.54, 25.54, 26.07, 26.07, 26.07, 26.07, 26.07, 26.24, 26.24, 26.24, 26.24, 26.24, 26.15, 26.15, 26.15, 26.15, 26.15, 25.98, 25.98, 25.98, 25.98, 25.98, 25.46, 25.46, 25.46, 25.46, 25.46, 25.51, 25.51, 25.51, 25.51, 25.51, 25.36, 25.36, 25.36, 25.36, 25.36, 24.73, 24.73, 24.73, 24.73, 24.73, 24.71, 24.71, 24.71, 24.71, 24.71, 23.62, 23.62, 23.62, 23.62, 23.62, 23.61, 23.61, 23.61, 23.61, 23.61, 23.41, 23.41, 23.41, 23.41, 23.41, 23.51, 23.51, 23.51, 23.51, 23.51, 23.49, 23.49, 23.49, 23.49, 23.49, 23.27, 23.27, 23.27, 23.27, 23.27, 22.96, 22.96, 22.96, 22.96, 22.96, 22.75, 22.75, 22.75, 22.75, 22.75, 22.55, 22.55, 22.55, 22.55, 22.55, 22.67, 22.67, 22.67, 22.67, 22.67, 22.76, 22.76, 22.76, 22.76, 22.76, 22.81, 22.81, 22.81, 22.81, 22.81, 22.86, 22.86, 22.86, 22.86, 22.86, 22.93, 22.93, 22.93, 22.93, 22.93, 22.96, 22.96, 22.96, 22.96, 22.96, 22.96, 22.96, 22.96, 22.96, 22.96, 22.83, 22.83, 22.83, 22.83, 22.83, 22.79, 22.79, 22.79, 22.79, 22.79, 22.69, 22.69, 22.69, 22.69, 22.69, 22.86, 22.86, 22.86, 22.86, 22.86, 22.92, 22.92, 22.92, 22.92, 22.92, 23.01, 23.01, 23.01, 23.01, 23.01, 23.09, 23.09, 23.09, 23.09, 23.09, 23.13, 23.13, 23.13, 23.13, 23.13, 23.14, 23.14, 23.14, 23.14, 23.14, 23.06, 23.06, 23.06, 23.06, 23.06, 22.9, 22.9, 22.9, 22.9, 22.9, 22.88, 22.88, 22.88, 22.88, 22.88, 22.71, 22.71, 22.71, 22.71, 22.71, 22.71, 22.71, 22.71, 22.71, 22.71, 22.85, 22.85, 22.85, 22.85, 22.85, 22.95, 22.95, 22.95, 22.95, 22.95, 23.04, 23.04, 23.04, 23.04, 23.04, 23.08, 23.08, 23.08, 23.08, 23.08, 22.98, 22.98, 22.98, 22.98, 22.98, 22.79, 22.79, 22.79, 22.79, 22.79, 22.49, 22.49, 22.49, 22.49, 22.49, 22.41, 22.41, 22.41, 22.41, 22.41, 22.32, 22.32, 22.32, 22.32, 22.32, 21.55, 21.55, 21.55, 21.55, 21.55, 21.13, 21.13, 21.13, 21.13, 21.13, 21.13, 21.13, 21.13, 21.13, 21.13, 21.22, 21.22, 21.22, 21.22, 21.22, 21.3, 21.3, 21.3]
                    
Loading

Details

kv_cache_usage_ratio

More
---
config:
    xyChart:
        titleFontSize: 12
        width: 900
        height: 600
    themeVariables:
        xyChart:
            titleColor: "#000000"
---
xychart-beta
    title "llama.cpp bench-server-baseline on Standard_NC4as_T4_v3
 duration=10m 440 iterations"
    y-axis "llamacpp:kv_cache_usage_ratio"
    x-axis "llamacpp:kv_cache_usage_ratio" 1713347813 --> 1713348437
    line [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.07, 0.07, 0.07, 0.07, 0.07, 0.29, 0.29, 0.29, 0.29, 0.29, 0.23, 0.23, 0.23, 0.23, 0.23, 0.09, 0.09, 0.09, 0.09, 0.09, 0.15, 0.15, 0.15, 0.15, 0.15, 0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.12, 0.12, 0.12, 0.12, 0.12, 0.15, 0.15, 0.15, 0.15, 0.15, 0.13, 0.13, 0.13, 0.13, 0.13, 0.2, 0.2, 0.2, 0.2, 0.2, 0.22, 0.22, 0.22, 0.22, 0.22, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.25, 0.25, 0.25, 0.25, 0.25, 0.12, 0.12, 0.12, 0.12, 0.12, 0.25, 0.25, 0.25, 0.25, 0.25, 0.23, 0.23, 0.23, 0.23, 0.23, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.16, 0.16, 0.16, 0.16, 0.16, 0.24, 0.24, 0.24, 0.24, 0.24, 0.25, 0.25, 0.25, 0.25, 0.25, 0.29, 0.29, 0.29, 0.29, 0.29, 0.13, 0.13, 0.13, 0.13, 0.13, 0.16, 0.16, 0.16, 0.16, 0.16, 0.14, 0.14, 0.14, 0.14, 0.14, 0.18, 0.18, 0.18, 0.18, 0.18, 0.12, 0.12, 0.12, 0.12, 0.12, 0.14, 0.14, 0.14, 0.14, 0.14, 0.15, 0.15, 0.15, 0.15, 0.15, 0.18, 0.18, 0.18, 0.18, 0.18, 0.27, 0.27, 0.27, 0.27, 0.27, 0.2, 0.2, 0.2, 0.2, 0.2, 0.19, 0.19, 0.19, 0.19, 0.19, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.16, 0.16, 0.16, 0.16, 0.16, 0.13, 0.13, 0.13, 0.13, 0.13, 0.16, 0.16, 0.16, 0.16, 0.16, 0.13, 0.13, 0.13, 0.13, 0.13, 0.22, 0.22, 0.22, 0.22, 0.22, 0.2, 0.2, 0.2, 0.2, 0.2, 0.18, 0.18, 0.18, 0.18, 0.18, 0.3, 0.3, 0.3, 0.3, 0.3, 0.13, 0.13, 0.13, 0.13, 0.13, 0.2, 0.2, 0.2, 0.2, 0.2, 0.13, 0.13, 0.13, 0.13, 0.13, 0.14, 0.14, 0.14, 0.14, 0.14, 0.12, 0.12, 0.12, 0.12, 0.12, 0.3, 0.3, 0.3, 0.3, 0.3, 0.44, 0.44, 0.44, 0.44, 0.44, 0.47, 0.47, 0.47, 0.47, 0.47, 0.5, 0.5, 0.5, 0.5, 0.5, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.45, 0.45, 0.45, 0.45, 0.45, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.14, 0.14, 0.14]
                    
Loading
requests_processing
More
---
config:
    xyChart:
        titleFontSize: 12
        width: 900
        height: 600
    themeVariables:
        xyChart:
            titleColor: "#000000"
---
xychart-beta
    title "llama.cpp bench-server-baseline on Standard_NC4as_T4_v3
 duration=10m 440 iterations"
    y-axis "llamacpp:requests_processing"
    x-axis "llamacpp:requests_processing" 1713347813 --> 1713348437
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.0, 5.0, 5.0, 5.0, 5.0, 5.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 4.0, 4.0, 4.0, 4.0, 4.0, 8.0, 8.0, 8.0, 8.0, 8.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 6.0, 6.0, 6.0, 6.0, 6.0, 1.0, 1.0, 1.0, 1.0, 1.0, 5.0, 5.0, 5.0, 5.0, 5.0, 8.0, 8.0, 8.0, 8.0, 8.0, 7.0, 7.0, 7.0, 7.0, 7.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 7.0, 7.0, 7.0, 7.0, 7.0, 8.0, 8.0, 8.0, 8.0, 8.0, 5.0, 5.0, 5.0, 5.0, 5.0, 2.0, 2.0, 2.0, 2.0, 2.0, 8.0, 8.0, 8.0, 8.0, 8.0, 5.0, 5.0, 5.0, 5.0, 5.0, 7.0, 7.0, 7.0]
                    
Loading

@zhouwg zhouwg closed this Apr 24, 2024
@zhouwg
Copy link
Contributor Author

zhouwg commented Apr 24, 2024

duplicate with #6869, so close it accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant