Skip to content
Merged
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pip install logits-processor-zoo
## Supported Frameworks
* transformers
* vLLM
* TensorRT-LLM
* TensorRT-LLM (>=0.20.0)

## Usage
Comment thread
hchings marked this conversation as resolved.

Expand Down Expand Up @@ -87,3 +87,5 @@ One common use case is to force writing python code just after thinking:
trigger_python = TriggerPhraseLogitsProcessor(phrase="\n```python", trigger_token_phrase="</think>",
tokenizer=tokenizer, trigger_count=1, trigger_after=True)
```
### PreventHallucinationLogitsProcessor
A logits processor that mitigates hallucinated model outputs by enforcing a predefined fallback phrase when token confidence falls below a specified threshold.
13 changes: 0 additions & 13 deletions example_notebooks/trtllm/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions example_notebooks/trtllm/cite_prompt_logits_processor.py

This file was deleted.

14 changes: 0 additions & 14 deletions example_notebooks/trtllm/gen_length_logits_processor.py

This file was deleted.

14 changes: 0 additions & 14 deletions example_notebooks/trtllm/multiple_choice_logits_processor.py

This file was deleted.

114 changes: 0 additions & 114 deletions example_notebooks/trtllm/utils.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
],
"source": [
"from example_notebooks.transformers.utils import LLMRunner\n",
"from examples.transformers.utils import LLMRunner\n",
"from logits_processor_zoo.transformers import CiteFromPromptLogitsProcessor\n",
"\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}
],
"source": [
"from example_notebooks.transformers.utils import LLMRunner\n",
"from examples.transformers.utils import LLMRunner\n",
"from logits_processor_zoo.transformers import ForceLastPhraseLogitsProcessor\n",
"\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"metadata": {},
"outputs": [],
"source": [
"from example_notebooks.transformers.utils import LLMRunner\n",
"from examples.transformers.utils import LLMRunner\n",
"from logits_processor_zoo.transformers import GenLengthLogitsProcessor\n",
"\n",
"example_prompts =[\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}
],
"source": [
"from example_notebooks.transformers.utils import LLMRunner\n",
"from examples.transformers.utils import LLMRunner\n",
"from logits_processor_zoo.transformers import MultipleChoiceLogitsProcessor\n",
"\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
],
"source": [
"from example_notebooks.transformers.utils import LLMRunner\n",
"from examples.transformers.utils import LLMRunner\n",
"from logits_processor_zoo.transformers import PreventHallucinationLogitsProcessor\n",
"\n",
"runner = LLMRunner()"
Expand Down
Loading