Metadata-Version: 2.2
Name: lm-sim
Version: 0.0.2
Summary: Python package to compute similarity between LMs
Author-email: Ilze Amanda Auzina <ilze.amanda.auzina@outlook.com>, Shashwat Goel <shashwatnow@gmail.com>, Joschka Strüber <joschka.strueber@bethgelab.org>
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# LM-Similarity

**lm-sim** is a Python module for computing similarity between Language Models and is distributed under the MIT license. 

## Installation

### Dependencies

**lm-sim** requries:
- Python (>=3.9)
- Numpy (>= 1.19.5)

### User installation 
If you already have a working installation of NumPy, the easiest way to install lm-sim is using pip:
```
pip install lm-sim
```

### Example Usage 
A simple example to compute probabilistic error consistency $k_p$ in the context of MCQs. Input has be to formatted as follows:
- `prob_a`: list[np.array], containing the softmax output probabilties of model a
- `prob_b`: list[np.array], containing the softmax output probabilties of model b
- `gt`: list[int], containing the index of the ground truth 

```
from lmsim.metrics import K_p

calculator = K_p()
calculator.compute_kp(prob_a, prob_b, gt)

```
