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

server: fix seed being reported back #7382

Merged

Conversation

JohannesGaessler
Copy link
Collaborator

Fixes #7381 .

When I fixed multiple slots using the same RNG state in #6835 I forgot to adapt the code that reports the seed back to the user. As a consequence the default seed is always being reported back regardless of what seed is actually being used. This PR simply changes the seed being reported back to the one actually being used.

@ggerganov ggerganov merged commit 4185839 into ggerganov:master May 19, 2024
75 checks passed
Copy link
Contributor

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

Expand details for performance related PR only
  • Concurrent users: 8, duration: 10m
  • HTTP request : avg=8157.71ms p(95)=20090.6ms fails=, finish reason: stop=520 truncated=51
  • Prompt processing (pp): avg=88.6tk/s p(95)=362.67tk/s
  • Token generation (tg): avg=36.87tk/s p(95)=48.12tk/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=server-fix-reported-seed commit=b5e4e193878cdcbf7a5e532c955206384b1f3a1a

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 571 iterations"
    y-axis "llamacpp:prompt_tokens_seconds"
    x-axis "llamacpp:prompt_tokens_seconds" 1716138145 --> 1716138773
    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, 664.88, 664.88, 664.88, 664.88, 664.88, 657.74, 657.74, 657.74, 657.74, 657.74, 688.84, 688.84, 688.84, 688.84, 688.84, 757.0, 757.0, 757.0, 757.0, 757.0, 787.47, 787.47, 787.47, 787.47, 787.47, 806.74, 806.74, 806.74, 806.74, 806.74, 818.85, 818.85, 818.85, 818.85, 818.85, 839.77, 839.77, 839.77, 839.77, 839.77, 860.26, 860.26, 860.26, 860.26, 860.26, 867.25, 867.25, 867.25, 867.25, 867.25, 890.03, 890.03, 890.03, 890.03, 890.03, 891.94, 891.94, 891.94, 891.94, 891.94, 889.01, 889.01, 889.01, 889.01, 889.01, 893.54, 893.54, 893.54, 893.54, 893.54, 892.97, 892.97, 892.97, 892.97, 892.97, 888.62, 888.62, 888.62, 888.62, 888.62, 884.01, 884.01, 884.01, 884.01, 884.01, 883.09, 883.09, 883.09, 883.09, 883.09, 881.3, 881.3, 881.3, 881.3, 881.3, 885.53, 885.53, 885.53, 885.53, 885.53, 890.05, 890.05, 890.05, 890.05, 890.05, 880.29, 880.29, 880.29, 880.29, 880.29, 880.88, 880.88, 880.88, 880.88, 880.88, 882.02, 882.02, 882.02, 882.02, 882.02, 891.76, 891.76, 891.76, 891.76, 891.76, 891.12, 891.12, 891.12, 891.12, 891.12, 887.77, 887.77, 887.77, 887.77, 887.77, 892.19, 892.19, 892.19, 892.19, 892.19, 890.68, 890.68, 890.68, 890.68, 890.68, 893.32, 893.32, 893.32, 893.32, 893.32, 897.53, 897.53, 897.53, 897.53, 897.53, 893.86, 893.86, 893.86, 893.86, 893.86, 892.53, 892.53, 892.53, 892.53, 892.53, 883.32, 883.32, 883.32, 883.32, 883.32, 880.85, 880.85, 880.85, 880.85, 880.85, 880.06, 880.06, 880.06, 880.06, 880.06, 882.38, 882.38, 882.38, 882.38, 882.38, 884.38, 884.38, 884.38, 884.38, 884.38, 879.97, 879.97, 879.97, 879.97, 879.97, 880.6, 880.6, 880.6, 880.6, 880.6, 854.66, 854.66, 854.66, 854.66, 854.66, 854.98, 854.98, 854.98, 854.98, 854.98, 854.72, 854.72, 854.72, 854.72, 854.72, 858.63, 858.63, 858.63, 858.63, 858.63, 857.77, 857.77, 857.77, 857.77, 857.77, 858.96, 858.96, 858.96, 858.96, 858.96, 860.97, 860.97, 860.97, 860.97, 860.97, 857.51, 857.51, 857.51, 857.51, 857.51, 860.77, 860.77, 860.77, 860.77, 860.77, 856.3, 856.3, 856.3, 856.3, 856.3, 858.59, 858.59, 858.59, 858.59, 858.59, 855.53, 855.53, 855.53, 855.53, 855.53, 856.52, 856.52, 856.52, 856.52, 856.52, 856.61, 856.61, 856.61, 856.61, 856.61, 857.49, 857.49, 857.49, 857.49, 857.49, 859.17, 859.17, 859.17, 859.17, 859.17, 859.53, 859.53, 859.53, 859.53, 859.53, 861.48, 861.48, 861.48, 861.48, 861.48, 860.75, 860.75, 860.75, 860.75, 860.75, 859.46, 859.46, 859.46, 859.46, 859.46]
                    
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 571 iterations"
    y-axis "llamacpp:predicted_tokens_seconds"
    x-axis "llamacpp:predicted_tokens_seconds" 1716138145 --> 1716138773
    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, 42.85, 42.85, 42.85, 42.85, 42.85, 27.36, 27.36, 27.36, 27.36, 27.36, 29.57, 29.57, 29.57, 29.57, 29.57, 31.99, 31.99, 31.99, 31.99, 31.99, 33.25, 33.25, 33.25, 33.25, 33.25, 34.68, 34.68, 34.68, 34.68, 34.68, 35.72, 35.72, 35.72, 35.72, 35.72, 35.85, 35.85, 35.85, 35.85, 35.85, 35.8, 35.8, 35.8, 35.8, 35.8, 35.09, 35.09, 35.09, 35.09, 35.09, 33.84, 33.84, 33.84, 33.84, 33.84, 33.11, 33.11, 33.11, 33.11, 33.11, 32.85, 32.85, 32.85, 32.85, 32.85, 31.35, 31.35, 31.35, 31.35, 31.35, 30.88, 30.88, 30.88, 30.88, 30.88, 31.19, 31.19, 31.19, 31.19, 31.19, 31.31, 31.31, 31.31, 31.31, 31.31, 31.14, 31.14, 31.14, 31.14, 31.14, 30.74, 30.74, 30.74, 30.74, 30.74, 30.68, 30.68, 30.68, 30.68, 30.68, 30.95, 30.95, 30.95, 30.95, 30.95, 30.88, 30.88, 30.88, 30.88, 30.88, 31.1, 31.1, 31.1, 31.1, 31.1, 31.47, 31.47, 31.47, 31.47, 31.47, 31.32, 31.32, 31.32, 31.32, 31.32, 31.4, 31.4, 31.4, 31.4, 31.4, 31.63, 31.63, 31.63, 31.63, 31.63, 31.9, 31.9, 31.9, 31.9, 31.9, 32.06, 32.06, 32.06, 32.06, 32.06, 32.27, 32.27, 32.27, 32.27, 32.27, 32.39, 32.39, 32.39, 32.39, 32.39, 32.22, 32.22, 32.22, 32.22, 32.22, 31.96, 31.96, 31.96, 31.96, 31.96, 31.48, 31.48, 31.48, 31.48, 31.48, 31.28, 31.28, 31.28, 31.28, 31.28, 31.34, 31.34, 31.34, 31.34, 31.34, 31.47, 31.47, 31.47, 31.47, 31.47, 31.66, 31.66, 31.66, 31.66, 31.66, 31.67, 31.67, 31.67, 31.67, 31.67, 31.56, 31.56, 31.56, 31.56, 31.56, 31.4, 31.4, 31.4, 31.4, 31.4, 30.89, 30.89, 30.89, 30.89, 30.89, 30.26, 30.26, 30.26, 30.26, 30.26, 30.14, 30.14, 30.14, 30.14, 30.14, 30.13, 30.13, 30.13, 30.13, 30.13, 30.08, 30.08, 30.08, 30.08, 30.08, 30.08, 30.08, 30.08, 30.08, 30.08, 30.09, 30.09, 30.09, 30.09, 30.09, 30.1, 30.1, 30.1, 30.1, 30.1, 29.99, 29.99, 29.99, 29.99, 29.99, 29.94, 29.94, 29.94, 29.94, 29.94, 29.97, 29.97, 29.97, 29.97, 29.97, 30.06, 30.06, 30.06, 30.06, 30.06, 30.22, 30.22, 30.22, 30.22, 30.22, 30.28, 30.28, 30.28, 30.28, 30.28, 30.4, 30.4, 30.4, 30.4, 30.4, 30.45, 30.45, 30.45, 30.45, 30.45, 30.44, 30.44, 30.44, 30.44, 30.44, 30.47, 30.47, 30.47, 30.47, 30.47, 30.6, 30.6, 30.6, 30.6, 30.6]
                    
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 571 iterations"
    y-axis "llamacpp:kv_cache_usage_ratio"
    x-axis "llamacpp:kv_cache_usage_ratio" 1716138145 --> 1716138773
    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, 0.36, 0.36, 0.36, 0.36, 0.36, 0.24, 0.24, 0.24, 0.24, 0.24, 0.11, 0.11, 0.11, 0.11, 0.11, 0.16, 0.16, 0.16, 0.16, 0.16, 0.08, 0.08, 0.08, 0.08, 0.08, 0.14, 0.14, 0.14, 0.14, 0.14, 0.1, 0.1, 0.1, 0.1, 0.1, 0.21, 0.21, 0.21, 0.21, 0.21, 0.31, 0.31, 0.31, 0.31, 0.31, 0.18, 0.18, 0.18, 0.18, 0.18, 0.19, 0.19, 0.19, 0.19, 0.19, 0.41, 0.41, 0.41, 0.41, 0.41, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.17, 0.17, 0.17, 0.17, 0.17, 0.16, 0.16, 0.16, 0.16, 0.16, 0.2, 0.2, 0.2, 0.2, 0.2, 0.31, 0.31, 0.31, 0.31, 0.31, 0.15, 0.15, 0.15, 0.15, 0.15, 0.17, 0.17, 0.17, 0.17, 0.17, 0.14, 0.14, 0.14, 0.14, 0.14, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.1, 0.1, 0.1, 0.1, 0.1, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.14, 0.14, 0.14, 0.14, 0.14, 0.16, 0.16, 0.16, 0.16, 0.16, 0.19, 0.19, 0.19, 0.19, 0.19, 0.28, 0.28, 0.28, 0.28, 0.28, 0.33, 0.33, 0.33, 0.33, 0.33, 0.29, 0.29, 0.29, 0.29, 0.29, 0.11, 0.11, 0.11, 0.11, 0.11, 0.14, 0.14, 0.14, 0.14, 0.14, 0.17, 0.17, 0.17, 0.17, 0.17, 0.11, 0.11, 0.11, 0.11, 0.11, 0.36, 0.36, 0.36, 0.36, 0.36, 0.47, 0.47, 0.47, 0.47, 0.47, 0.36, 0.36, 0.36, 0.36, 0.36, 0.31, 0.31, 0.31, 0.31, 0.31, 0.22, 0.22, 0.22, 0.22, 0.22, 0.24, 0.24, 0.24, 0.24, 0.24, 0.26, 0.26, 0.26, 0.26, 0.26, 0.18, 0.18, 0.18, 0.18, 0.18, 0.21, 0.21, 0.21, 0.21, 0.21, 0.18, 0.18, 0.18, 0.18, 0.18, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.27, 0.27, 0.27, 0.27, 0.27, 0.15, 0.15, 0.15, 0.15, 0.15, 0.12, 0.12, 0.12, 0.12, 0.12, 0.15, 0.15, 0.15, 0.15, 0.15, 0.1, 0.1, 0.1, 0.1, 0.1, 0.15, 0.15, 0.15, 0.15, 0.15, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.11, 0.11, 0.11, 0.11, 0.11, 0.13, 0.13, 0.13, 0.13, 0.13]
                    
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 571 iterations"
    y-axis "llamacpp:requests_processing"
    x-axis "llamacp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 3.0, 3.0, 3.0, 3.0, 3.0, 7.0, 7.0, 7.0, 7.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.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, 5.0, 5.0, 5.0, 5.0, 5.0, 7.0, 7.0, 7.0, 7.0, 7.0, 4.0, 4.0, 4.0, 4.0, 4.0, 7.0, 7.0, 7.0, 7.0, 7.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, 3.0, 3.0, 3.0, 3.0, 3.0, 2.0, 2.0, 2.0, 2.0, 2.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, 4.0, 4.0, 4.0, 4.0, 4.0, 6.0, 6.0, 6.0, 6.0, 6.0, 8.0, 8.0, 8.0, 8.0, 8.0, 3.0, 3.0, 3.0, 3.0, 3.0, 5.0, 5.0, 5.0, 5.0, 5.0]
                    
Loading

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

Successfully merging this pull request may close these issues.

Custom seed values ignored by llama.cpp HTTP server
2 participants