
This pipeline evaluates different text compression approaches using LLMs and analyzes their performance through reward modeling.
pip install datasets openai httpx tqdm matplotlib pandas numpy
export TOGETHER_API_KEY="your_together_api_key"
export CONDENSES_API_KEY="your_condenses_api_key"
export NVIDIA_API="your_nvidia_api_key"
forward.py)Compresses text samples using two methods:
python forward.py
Output: compressed_results.json
reward.py)Generates responses using the compressed prompts with Meta-Llama-3.1-8B.
python reward.py
Outputs:
completion_results.jsonreward_results.jsonvisualize_rewards.py)Creates visualizations comparing different compression methods across multiple aspects:
python visualize_rewards.py
Output: reward_analysis_error_bars.png
.
├── forward.py # Text compression
├── compress_llm.py # LLM compression implementation
├── reward.py # Completion generation and reward computation
├── visualize_rewards.py # Results visualization
└── README.md

This pipeline evaluates different text compression approaches using LLMs and analyzes their performance through reward modeling.
pip install datasets openai httpx tqdm matplotlib pandas numpy
export TOGETHER_API_KEY="your_together_api_key"
export CONDENSES_API_KEY="your_condenses_api_key"
export NVIDIA_API="your_nvidia_api_key"
forward.py)Compresses text samples using two methods:
python forward.py
Output: compressed_results.json
reward.py)Generates responses using the compressed prompts with Meta-Llama-3.1-8B.
python reward.py
Outputs:
completion_results.jsonreward_results.jsonvisualize_rewards.py)Creates visualizations comparing different compression methods across multiple aspects:
python visualize_rewards.py
Output: reward_analysis_error_bars.png
.
├── forward.py # Text compression
├── compress_llm.py # LLM compression implementation
├── reward.py # Completion generation and reward computation
├── visualize_rewards.py # Results visualization
└── README.md