HivePaaS
Docker Swarm 기반 오픈소스 자체 호스팅 PaaS, SSL·백업·자동 확장 지원
JAX용 열역학 하이퍼그래프 모델 라이브러리
Thermodynamic Hypergraphical Model Library in JAX
개발 도구Python · HTMLGitHub @extropic-ai직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗THRML is a JAX library for building and sampling probabilistic graphical models, with a focus on efficient block Gibbs sampling and energy-based models. Extropic is developing hardware to make sampling from certain classes of discrete PGMs massively more energy efficient; THRML provides GPU‑accelerated tools for block sampling on sparse, heterogeneous graphs, making it a natural place to prototype today and experiment with future Extropic hardware.
Features include:
From a technical point of view, the internal structure compiles factor-based interactions to a compact "global" state representation, minimizing Python loops and maximizing array-level parallelism in JAX.
Requires Python 3.10+.
pip install thrml
or
uv pip install thrml
Available at docs.thrml.ai.
If you use THRML in your research, please cite us!
@misc{jelinčič2025efficientprobabilistichardwarearchitecture,
title={An efficient probabilistic hardware architecture for diffusion-like models},
author={Andraž Jelinčič and Owen Lockwood and Akhil Garlapati and Guillaume Verdon and Trevor McCourt},
year={2025},
eprint={2510.23972},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2510.23972},
}
Sampling a small Ising chain with two-color block Gibbs:
import jax
import jax.numpy as jnp
from thrml import SpinNode, Block, SamplingSchedule, sample_states
from thrml.models import IsingEBM, IsingSamplingProgram, hinton_init
nodes = [SpinNode() for _ in range(5)]
edges = [(nodes[i], nodes[i+1]) for i in range(4)]
biases = jnp.zeros((5,))
weights = jnp.ones((4,)) * 0.5
beta = jnp.array(1.0)
model = IsingEBM(nodes, edges, biases, weights, beta)
free_blocks = [Block(nodes[::2]), Block(nodes[1::2])]
program = IsingSamplingProgram(model, free_blocks, clamped_blocks=[])
key = jax.random.key(0)
k_init, k_samp = jax.random.split(key, 2)
init_state = hinton_init(k_init, model, free_blocks, ())
schedule = SamplingSchedule(n_warmup=100, n_samples=1000, steps_per_sample=2)
samples = sample_states(k_samp, program, schedule, init_state, [], [Block(nodes)])
Sampling uses JaxBackend by default. IsingSamplingProgram holds the logical model
in .model and its block layout in .gibbs_spec. Pass backend=your_backend to
sample_states, sample_with_observation, estimate_moments, or estimate_kl_grad
to use a backend supplied by an external package. Physical execution and calibration
belong to that package.
An initial state of None requests continuation of the backend's retained chain;
actual JAX sampling requires an explicit state. Use [] for an explicitly empty
state when there are no free blocks. Explicit physical initialization is optional
and backend-owned, and may require additional device operations.
For low-level JAX updates or access to .samplers and .per_block_*, convert an
Ising program with JaxBackend().compile(program). It uses a private JIT helper to
reuse the graph and layout work while applying the current model parameters on
every call. The first conversion compiles this helper; an enclosing JIT inlines it.
The result is the existing executable representation. Compile again after changing
the model parameters. Existing BlockSamplingProgram and FactorSamplingProgram
objects are returned unchanged.
See the concepts guide for portable observers,
backend batching, and training.
Sampling schedules are immutable because JAX uses them as compilation-cache keys.
Mutating a cached schedule can reuse a computation with the old record count.
Use dataclasses.replace(schedule, n_samples=100) to create an updated schedule.
For a more extensive example, see the dtm-replication repository which runs on THRML.