Human-Centric-Machine-Learning/counterfactual-llms

Code for "Counterfactual Token Generation in Large Language Models", Arxiv 2024.

24
/ 100
Experimental

This project helps you understand how a large language model's output would change if it had made a different choice earlier in its generation process. You input an existing story or text generated by an LLM, and it outputs alternative versions showing what might have happened if specific early tokens were different. This is useful for researchers and analysts who want to examine the underlying reasoning and potential biases within LLM-generated content.

No commits in the last 6 months.

Use this if you need to explore 'what-if' scenarios in text generation to understand an LLM's causal dependencies or to identify biases by seeing how outputs shift with small initial changes.

Not ideal if you are looking for a tool to simply improve the quality or factual accuracy of LLM outputs directly, as its primary purpose is analytical exploration.

LLM-analysis bias-detection text-generation-research causal-inference AI-ethics
No License Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 7 / 25
Maturity 8 / 25
Community 9 / 25

How are scores calculated?

Stars

32

Forks

3

Language

Jupyter Notebook

License

Last pushed

Nov 07, 2024

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/Human-Centric-Machine-Learning/counterfactual-llms"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.