Giter Club home page Giter Club logo

Comments (4)

thakkarparth007 avatar thakkarparth007 commented on April 19, 2024 2

Now that I've been working with this a little more, I see why this is an issue. Ragged batches are going to be pretty common and we need to do something on our side to do batching. I'm running an experiment that requires generating ~200 tokens and the 6B model takes like 22 seconds on an A10 without batching (~110ms/token sounds too high, not sure what's going on). If batching is enabled and ragged batches exist, then triton processes each request in the batch serially but doesn't return till it's done processing the entire batch. So I see a latency of ~120s because of the fake "batching". I don't see why it does that but that's been my observation.

Here's a log to show that:
https://pastebin.com/36WqBC3F

Btw the current copilot_proxy code calls generate() in the main thread, so there's no concurrency there either. I've fixed that on my local version for now and will send a PR soon.

from fauxpilot.

thakkarparth007 avatar thakkarparth007 commented on April 19, 2024

I have a possibly dumb question -- is there a benefit of doing this? I thought Triton already supports dynamic batching, so why would proxy code need to handle this?

from fauxpilot.

leemgs avatar leemgs commented on April 19, 2024

# Max number of tokens the model can handle
MAX_MODEL_LEN = 2048

FYI, When I actually tested the maximum length of the token using Codegen model, it was possible to 2025 instead of 2048.

from fauxpilot.

moyix avatar moyix commented on April 19, 2024

I have a possibly dumb question -- is there a benefit of doing this? I thought Triton already supports dynamic batching, so why would proxy code need to handle this?

Oh, you may be right! I should do some perf testing to see if there's any benefit to sending the batch ourselves vs letting Triton batch the inputs. I may have been confused when I read this issue (triton-inference-server/fastertransformer_backend#23) because looking more closely it only applies to ragged batches.

from fauxpilot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.