Skip to content
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

ggml, ngram-cache, log: added const and const ref for function params #7269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GermanAizek
Copy link
Contributor

No description provided.

@mofosyne mofosyne added review complexity : medium Generally require more time to grok but manageable by beginner to medium expertise level refactoring Refactoring labels May 14, 2024
Copy link
Contributor

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

Expand details for performance related PR only
  • Concurrent users: 8, duration: 10m
  • HTTP request : avg=8659.5ms p(95)=21543.02ms fails=, finish reason: stop=468 truncated=70
  • Prompt processing (pp): avg=100.65tk/s p(95)=419.47tk/s
  • Token generation (tg): avg=32.7tk/s p(95)=46.5tk/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=const-ptr-params commit=ca61d3e49802854629bf91c131f550b207ecf805

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 538 iterations"
    y-axis "llamacpp:prompt_tokens_seconds"
    x-axis "llamacpp:prompt_tokens_seconds" 1715647699 --> 1715648323
    line [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 363.23, 363.23, 363.23, 363.23, 363.23, 967.34, 967.34, 967.34, 967.34, 967.34, 949.61, 949.61, 949.61, 949.61, 949.61, 929.35, 929.35, 929.35, 929.35, 929.35, 919.47, 919.47, 919.47, 919.47, 919.47, 969.84, 969.84, 969.84, 969.84, 969.84, 954.66, 954.66, 954.66, 954.66, 954.66, 948.25, 948.25, 948.25, 948.25, 948.25, 957.87, 957.87, 957.87, 957.87, 957.87, 953.03, 953.03, 953.03, 953.03, 953.03, 954.68, 954.68, 954.68, 954.68, 954.68, 974.69, 974.69, 974.69, 974.69, 974.69, 1002.21, 1002.21, 1002.21, 1002.21, 1002.21, 1018.36, 1018.36, 1018.36, 1018.36, 1018.36, 1037.77, 1037.77, 1037.77, 1037.77, 1037.77, 1041.46, 1041.46, 1041.46, 1041.46, 1041.46, 1034.35, 1034.35, 1034.35, 1034.35, 1034.35, 1035.04, 1035.04, 1035.04, 1035.04, 1035.04, 1036.42, 1036.42, 1036.42, 1036.42, 1036.42, 1031.17, 1031.17, 1031.17, 1031.17, 1031.17, 1026.2, 1026.2, 1026.2, 1026.2, 1026.2, 1026.38, 1026.38, 1026.38, 1026.38, 1026.38, 1025.14, 1025.14, 1025.14, 1025.14, 1025.14, 1030.55, 1030.55, 1030.55, 1030.55, 1030.55, 1024.59, 1024.59, 1024.59, 1024.59, 1024.59, 1023.24, 1023.24, 1023.24, 1023.24, 1023.24, 1025.24, 1025.24, 1025.24, 1025.24, 1025.24, 1018.44, 1018.44, 1018.44, 1018.44, 1018.44, 1012.84, 1012.84, 1012.84, 1012.84, 1012.84, 1010.59, 1010.59, 1010.59, 1010.59, 1010.59, 1013.32, 1013.32, 1013.32, 1013.32, 1013.32, 1008.72, 1008.72, 1008.72, 1008.72, 1008.72, 1009.8, 1009.8, 1009.8, 1009.8, 1009.8, 1013.21, 1013.21, 1013.21, 1013.21, 1013.21, 1015.61, 1015.61, 1015.61, 1015.61, 1015.61, 1017.51, 1017.51, 1017.51, 1017.51, 1017.51, 1015.14, 1015.14, 1015.14, 1015.14, 1015.14, 1011.32, 1011.32, 1011.32, 1011.32, 1011.32, 1009.51, 1009.51, 1009.51, 1009.51, 1009.51, 1004.06, 1004.06, 1004.06, 1004.06, 1004.06, 1003.64, 1003.64, 1003.64, 1003.64, 1003.64, 1001.59, 1001.59, 1001.59, 1001.59, 1001.59, 995.36, 995.36, 995.36, 995.36, 995.36, 954.6, 954.6, 954.6, 954.6, 954.6, 931.69, 931.69, 931.69, 931.69, 931.69, 929.45, 929.45, 929.45, 929.45, 929.45, 928.06, 928.06, 928.06, 928.06, 928.06, 927.18, 927.18, 927.18, 927.18, 927.18, 928.61, 928.61, 928.61, 928.61, 928.61, 926.5, 926.5, 926.5, 926.5, 926.5, 931.39, 931.39, 931.39, 931.39, 931.39, 929.79, 929.79, 929.79, 929.79, 929.79, 931.08, 931.08, 931.08, 931.08, 931.08, 932.86, 932.86, 932.86, 932.86, 932.86, 931.13, 931.13, 931.13, 931.13, 931.13, 928.48, 928.48, 928.48, 928.48, 928.48, 926.82, 926.82, 926.82, 926.82, 926.82, 927.35, 927.35, 927.35, 927.35, 927.35, 926.71, 926.71, 926.71, 926.71, 926.71, 925.82, 925.82, 925.82, 925.82, 925.82, 927.08, 927.08, 927.08]
                    
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 538 iterations"
    y-axis "llamacpp:predicted_tokens_seconds"
    x-axis "llamacpp:predicted_tokens_seconds" 1715647699 --> 1715648323
    line [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 38.6, 38.6, 38.6, 38.6, 38.6, 30.79, 30.79, 30.79, 30.79, 30.79, 28.52, 28.52, 28.52, 28.52, 28.52, 28.16, 28.16, 28.16, 28.16, 28.16, 29.46, 29.46, 29.46, 29.46, 29.46, 30.71, 30.71, 30.71, 30.71, 30.71, 31.64, 31.64, 31.64, 31.64, 31.64, 32.4, 32.4, 32.4, 32.4, 32.4, 32.76, 32.76, 32.76, 32.76, 32.76, 33.03, 33.03, 33.03, 33.03, 33.03, 33.19, 33.19, 33.19, 33.19, 33.19, 32.56, 32.56, 32.56, 32.56, 32.56, 32.47, 32.47, 32.47, 32.47, 32.47, 31.5, 31.5, 31.5, 31.5, 31.5, 31.46, 31.46, 31.46, 31.46, 31.46, 31.73, 31.73, 31.73, 31.73, 31.73, 31.98, 31.98, 31.98, 31.98, 31.98, 31.56, 31.56, 31.56, 31.56, 31.56, 31.34, 31.34, 31.34, 31.34, 31.34, 31.15, 31.15, 31.15, 31.15, 31.15, 30.9, 30.9, 30.9, 30.9, 30.9, 31.04, 31.04, 31.04, 31.04, 31.04, 30.99, 30.99, 30.99, 30.99, 30.99, 31.0, 31.0, 31.0, 31.0, 31.0, 31.13, 31.13, 31.13, 31.13, 31.13, 31.1, 31.1, 31.1, 31.1, 31.1, 30.93, 30.93, 30.93, 30.93, 30.93, 30.81, 30.81, 30.81, 30.81, 30.81, 31.1, 31.1, 31.1, 31.1, 31.1, 31.25, 31.25, 31.25, 31.25, 31.25, 31.33, 31.33, 31.33, 31.33, 31.33, 31.52, 31.52, 31.52, 31.52, 31.52, 31.56, 31.56, 31.56, 31.56, 31.56, 31.49, 31.49, 31.49, 31.49, 31.49, 31.37, 31.37, 31.37, 31.37, 31.37, 30.95, 30.95, 30.95, 30.95, 30.95, 30.95, 30.95, 30.95, 30.95, 30.95, 30.98, 30.98, 30.98, 30.98, 30.98, 31.06, 31.06, 31.06, 31.06, 31.06, 31.14, 31.14, 31.14, 31.14, 31.14, 31.25, 31.25, 31.25, 31.25, 31.25, 31.28, 31.28, 31.28, 31.28, 31.28, 31.16, 31.16, 31.16, 31.16, 31.16, 30.68, 30.68, 30.68, 30.68, 30.68, 30.63, 30.63, 30.63, 30.63, 30.63, 29.6, 29.6, 29.6, 29.6, 29.6, 29.3, 29.3, 29.3, 29.3, 29.3, 29.28, 29.28, 29.28, 29.28, 29.28, 29.34, 29.34, 29.34, 29.34, 29.34, 29.49, 29.49, 29.49, 29.49, 29.49, 29.59, 29.59, 29.59, 29.59, 29.59, 29.65, 29.65, 29.65, 29.65, 29.65, 29.66, 29.66, 29.66, 29.66, 29.66, 29.47, 29.47, 29.47, 29.47, 29.47, 29.45, 29.45, 29.45, 29.45, 29.45, 29.51, 29.51, 29.51, 29.51, 29.51, 29.6, 29.6, 29.6, 29.6, 29.6, 29.7, 29.7, 29.7, 29.7, 29.7, 29.83, 29.83, 29.83, 29.83, 29.83, 29.93, 29.93, 29.93]
                    

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 538 iterations"
    y-axis "llamacpp:kv_cache_usage_ratio"
    x-axis "llamacpp:kv_cache_usage_ratio" 1715647699 --> 1715648323
    line [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.04, 0.04, 0.04, 0.04, 0.04, 0.4, 0.4, 0.4, 0.4, 0.4, 0.38, 0.38, 0.38, 0.38, 0.38, 0.4, 0.4, 0.4, 0.4, 0.4, 0.16, 0.16, 0.16, 0.16, 0.16, 0.19, 0.19, 0.19, 0.19, 0.19, 0.12, 0.12, 0.12, 0.12, 0.12, 0.16, 0.16, 0.16, 0.16, 0.16, 0.14, 0.14, 0.14, 0.14, 0.14, 0.2, 0.2, 0.2, 0.2, 0.2, 0.15, 0.15, 0.15, 0.15, 0.15, 0.21, 0.21, 0.21, 0.21, 0.21, 0.25, 0.25, 0.25, 0.25, 0.25, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.15, 0.15, 0.15, 0.15, 0.15, 0.16, 0.16, 0.16, 0.16, 0.16, 0.2, 0.2, 0.2, 0.2, 0.2, 0.26, 0.26, 0.26, 0.26, 0.26, 0.29, 0.29, 0.29, 0.29, 0.29, 0.13, 0.13, 0.13, 0.13, 0.13, 0.14, 0.14, 0.14, 0.14, 0.14, 0.15, 0.15, 0.15, 0.15, 0.15, 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.31, 0.31, 0.31, 0.31, 0.31, 0.24, 0.24, 0.24, 0.24, 0.24, 0.11, 0.11, 0.11, 0.11, 0.11, 0.12, 0.12, 0.12, 0.12, 0.12, 0.13, 0.13, 0.13, 0.13, 0.13, 0.14, 0.14, 0.14, 0.14, 0.14, 0.17, 0.17, 0.17, 0.17, 0.17, 0.24, 0.24, 0.24, 0.24, 0.24, 0.19, 0.19, 0.19, 0.19, 0.19, 0.31, 0.31, 0.31, 0.31, 0.31, 0.18, 0.18, 0.18, 0.18, 0.18, 0.2, 0.2, 0.2, 0.2, 0.2, 0.18, 0.18, 0.18, 0.18, 0.18, 0.16, 0.16, 0.16, 0.16, 0.16, 0.13, 0.13, 0.13, 0.13, 0.13, 0.1, 0.1, 0.1, 0.1, 0.1, 0.31, 0.31, 0.31, 0.31, 0.31, 0.52, 0.52, 0.52, 0.52, 0.52, 0.54, 0.54, 0.54, 0.54, 0.54, 0.58, 0.58, 0.58, 0.58, 0.58, 0.55, 0.55, 0.55, 0.55, 0.55, 0.21, 0.21, 0.21, 0.21, 0.21, 0.2, 0.2, 0.2, 0.2, 0.2, 0.12, 0.12, 0.12, 0.12, 0.12, 0.19, 0.19, 0.19, 0.19, 0.19, 0.12, 0.12, 0.12, 0.12, 0.12, 0.18, 0.18, 0.18, 0.18, 0.18, 0.31, 0.31, 0.31, 0.31, 0.31, 0.21, 0.21, 0.21, 0.21, 0.21, 0.27, 0.27, 0.27, 0.27, 0.27, 0.13, 0.13, 0.13, 0.13, 0.13, 0.11, 0.11, 0.11, 0.11, 0.11, 0.12, 0.12, 0.12, 0.12, 0.12, 0.13, 0.13, 0.13, 0.13, 0.13, 0.11, 0.11, 0.11]
                    
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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 6.0, 5.0, 5.0, 5.0, 5.0, 5.0, 6.0, 6.0, 6.0, 6.0, 6.0, 3.0, 3.0, 3.0, 3.0, 3.0, 7.0, 7.0, 7.0, 7.0, 7.0, 3.0, 3.0, 3.0, 3.0, 3.0, 6.0, 6.0, 6.0, 6.0, 6.0, 7.0, 7.0, 7.0, 7.0, 7.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, 4.0, 4.0, 4.0, 4.0, 4.0, 3.0, 3.0, 3.0, 3.0, 3.0, 6.0, 6.0, 6.0, 6.0, 6.0, 5.0, 5.0, 5.0, 5.0, 5.0, 3.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0, 4.0, 7.0, 7.0, 7.0, 7.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.0, 5.0, 5.0, 5.0, 5.0, 5.0, 6.0, 6.0, 6.0, 6.0, 6.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 4.0, 4.0, 4.0, 4.0, 4.0, 6.0, 6.0, 6.0, 6.0, 6.0, 5.0, 5.0, 5.0]
                    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactoring review complexity : medium Generally require more time to grok but manageable by beginner to medium expertise level
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants