Comments (1)
👋 I wrote a implementation of constrained sampling with candle here that might be useful as a reference. Here are a few things I found important:
- Parsing must be incremental if you want to get reasonable speeds for longer sequences (This makes FSM a good choice)
- You can accelerate text generation by eagerly sampling the grammar and feeding the required next tokens into the LLM in one batch instead of one token at a time
from candle.
Related Issues (20)
- Can't loop over model implementation based off examples more than N times (7-20+ it ends up breaking) HOT 12
- Update Installation Page for Windows Requirements
- candle tensor operations are bit slower than pytorch tensor operations HOT 9
- Tensor copy from noncontiguous tensor still make noncontiguous tensor HOT 2
- bias is not randomly initialized on metal HOT 4
- Flash Attention not working on CUDA 12.1 HOT 10
- Quantized much slower than llama.cpp with same model and settings... HOT 22
- [help] how to update a portion of a long tensor HOT 5
- The current `squeeze` and `unsqueeze` implementations may be degreasing in some EXAMPLES. HOT 2
- .sum() with a u8 tensor overflows after 255 HOT 1
- Support multimodal LLMs? HOT 2
- Latest tensor squeeze impl make cuda matmal fail HOT 13
- Issue Labelling for Good First Issues
- 1.58 bit implementation HOT 5
- [help] Run gemma example using the command line on my mac, got some runtime errors. HOT 2
- Avoiding `.contiguous` call before `matmul` HOT 12
- How to use `topk`?
- best way to get `dims()` from a model?
- YoloV9 ONNX: unsupported op_type Identity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from candle.