Skip to main content

AlignLLM - Case Alignment Package

This package contains the mathematical implementation of ILRAlign and WILRAlign from AlignLLM.

Sample usage

!pip install alignllm-case-alignment-package
import numpy as np
from case_alignment_package import get_case_alignment, get_weighted_case_alignment

# Example case embedding
case_ = [np.array([1, 0, 1]), np.array([1, 2, 1])]

# Example casebase
case_base = [
    [np.array([0, 3, 2]), np.array([3, 2, 2])],
    [np.array([1, 0, 1]), np.array([1, 0, 2])]
]

# ILR Score (standard case alignment)
print("ILRScore:", get_case_alignment(case_, case_base))
# 0.7077719041151351

# WILR Score (weighted case alignment)
print("WILRScore:", get_weighted_case_alignment(case_, case_base))
# 0.7366226857266566

Release files for alignllm-case-alignment-package 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alignllm-case-alignment-package 0.1.3
File Size Uploaded
alignllm_case_alignment_package-0.1.3.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for alignllm-case-alignment-package 0.1.3
File Interpreter ABI Platform
alignllm_case_alignment_package-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 4.4 kB

Release files / alignllm_case_alignment_package-0.1.3.tar.gz

Download URL alignllm_case_alignment_package-0.1.3.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d5a91cb67b7e4feb6eb26b8989fd812e9f233893b9f7333159c00ef930b5dfc9
BLAKE2b-256 checksum
How to use checksums
8743e44e8747cc974b7c5b91ef79620c36bae59b468c0eec76db506046ff85c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.5

Release files / alignllm_case_alignment_package-0.1.3-py3-none-any.whl

Download URL alignllm_case_alignment_package-0.1.3-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b1d9faf60c512229fa44cc39f931a5179ad44349aaaad095c5487f43a205e94
BLAKE2b-256 checksum
How to use checksums
fe024c76dd2e85a41979eaa195fc6f7781ce956b238b06f77a5f85d1a12b9909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page