Skip to content

feat: Support for DRY and XTC high level sampler API (already existing in llama.cpp)... #548

@onzag

Description

@onzag

Feature Description

Currently the samplers for top_p temperature, etc... are included by default, but I don't see anywhere, in the docs or in the type definitions ot have DRY and XTC data, which appear clearly in the llama.cpp and doesn't seem like they'd be too hard to implement as they are natively supported.

abetlen/llama-cpp-python#1813

Similar comments about this in llama-cpp-python.

The Solution

Adding the options to dry_sampler and xtc_sampler with the given options for generateCompletition and other functions.

dry_sampler

  • enabled boolean
  • multiplier number,
  • base number,
  • allowed_length number
  • penalty_last_n number
  • seq_breakers: Array

xtc_sampler

  • enabled boolean
  • probability number
  • threshold: number
  • min_keep: number
  • seed?: number

Considered Alternatives

I couldn't find any workaround, checked grammar defintions, checked for any mention of dry or xtc and couldn't find it.

Additional Context

No response

Related Features to This Feature Request

  • Metal support
  • CUDA support
  • Vulkan support
  • Grammar
  • Function calling

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, but I don't know how to start. I would need guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions