This project demonstrates that Large Language Models (LLMs) produce probabilistic outputs.
To show that the same prompt can generate different responses when sampling parameters like temperature are used.
- GPT-2
- DistilGPT2
- Phi-2
- Python
- Hugging Face Transformers
- Send the same prompt to the LLM multiple times.
- Store responses in a list.
- Compare outputs.
- Change temperature parameter to observe variation.
Explain machine learning in simple words.
Different outputs are generated for the same prompt due to probabilistic token sampling.
pip install -r requirements.txt python llm_test.py