hfppl icon indicating copy to clipboard operation
hfppl copied to clipboard

Probabilistic programming with HuggingFace language models

Results 14 hfppl issues
Sort by recently updated
recently updated
newest added

Simply adding the following lines to the top of the method should do the trick: ```python for particle in particles: particle.start() ```

![image](https://github.com/probcomp/hfppl/assets/76865636/d646a0f9-8d78-4d46-858d-7e5d3016cf0e) I modify .lm.s ---> lm it can run.But have a new issue. ![image](https://github.com/probcomp/hfppl/assets/76865636/4b4f2902-01a3-4a26-b5f1-5e3d291400d9) [/usr/local/lib/python3.10/dist-packages/hfppl/distributions/lmcontext.py](https://localhost:8080/#) in sample(self) 24 async def sample(self): 25 probs = np.exp(self.ctx.next_token_logprobs) ---> 26 token_id = np.random.choice(len(probs),...

https://colab.research.google.com/drive/1uJEC-U8dcwsTWccCDGVexpgXexzZ642n?usp=sharing#scrollTo=gsi7R6D0NcGn&uniqifier=1 ![image](https://github.com/probcomp/hfppl/assets/76865636/71d2b70e-b8fb-4648-866f-9d03d73f51d3) 10 self.lm = LMContext(LLM, prompt) 11 self.q = LMContext(LLM, prompt) ---> 12 self.prompt_len = len(str(self.lm.s)) 13 self.max_tokens = max_tokens 14 AttributeError: 'LMContext' object has no attribute 's'

Hi, Great work. Would it be possible to get more examples? I'd like to see how to use Infilling and Prompt Intersection are used. I think it would really help...

thank you for releasing this amazing repo - SMC steering looks very promising I think this will probably be the first time a lot of DL Engineers come across the...

I thought it'd be fun to add functionality for automatically generating a token graph from the `TokenTrie` class, sort of like the one in the original LLaMPPL paper! A screenshot...

Could you provide an example of how to use `Model.twist()`? Currently, I'm calling it in `step()` with values between 0 and 1. I'd imagine that the effect size should be...

I have a question about the role of N (the number of particles), and K (the factor) in the task of prompt intersection. I am trying to replicate Fig. 4...

This PR adds stratified resampling to `smc_standard`. The resampling method can be specified by a new `resampling_method` argument to `smc_standard` which defaults to `multinomial` (and thus preserves the past behaviour)....

updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.9...v0.11.4)