Giter Site home page Giter Site logo

Comments (9)

guillaumekln avatar guillaumekln commented on May 21, 2024

Hi,

You can still pass a batch of inputs, but internally they will be processed individually. Did you encounter performance issues while using a target prefix?

from ctranslate2.

guillaumekln avatar guillaumekln commented on May 21, 2024

@vince62s Were you able to try passing a batch of inputs and observe the behavior?

from ctranslate2.

vince62s avatar vince62s commented on May 21, 2024

not yet sorry, still finetuning a model to test this.

from ctranslate2.

vince62s avatar vince62s commented on May 21, 2024

@guillaumekln In fact I am not sure if we are talking about the same thing.
I don't think that using a target prefix itself is the issue, we just observe a slow translation because of the lack of batching.
End result yes it is slower than normal inference.

from ctranslate2.

guillaumekln avatar guillaumekln commented on May 21, 2024

Yes, I understand. I just thought that my comment in OpenNMT/OpenNMT-py#1800 led you to think that we are not accepting a batch of inputs when using a target prefix.

So this issue is about improving batch performance of target prefix.

from ctranslate2.

guillaumekln avatar guillaumekln commented on May 21, 2024

How are you using the target prefix? Is it a fixed prefix for all inputs, like a context?

I'm just not sure to find use cases where a target prefix is available for many inputs at once.

from ctranslate2.

vince62s avatar vince62s commented on May 21, 2024

as soon as you deal with many special tokens (politeness, extractiveness for summarization, length control, context, ...) , it becomes convoluted, not always fixed.

from ctranslate2.

guillaumekln avatar guillaumekln commented on May 21, 2024

Why not adding these tokens on the source side? The issue with the target side is that the first decoding step on <s> is not constrained by these tokens.

from ctranslate2.

vince62s avatar vince62s commented on May 21, 2024

this is not necessarily what we are doing exactly, but this gives you an example.
https://www.aclweb.org/anthology/W17-5702.pdf

from ctranslate2.

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.