That's just link aggregator of everything I consider interesting, especially DL and topological condensed matter physics. @EvgeniyZh
Scaling Test-Time Compute Without Verification or RL is Suboptimal https://arxiv.org/abs/2502.12118
Читать полностью…Extracting the topological spins from bulk multipartite entanglement https://arxiv.org/abs/2502.12259
Читать полностью…Functional recovery of adult brain tissue arrested in time during cryopreservation by vitrification https://www.biorxiv.org/content/10.1101/2025.01.22.634384
Читать полностью…Diverse Inference and Verification for Advanced Reasoning https://arxiv.org/abs/2502.09955
Читать полностью…Training Language Models for Social Deduction with Multi-Agent Reinforcement Learning https://arxiv.org/abs/2502.06060
Читать полностью…From Pixels to Components: Eigenvector Masking for Visual Representation Learning https://arxiv.org/abs/2502.06314
Читать полностью…Competitive Programming with Large Reasoning Models https://arxiv.org/abs/2502.06807
Читать полностью…It's All in The [MASK]: Simple Instruction-Tuning Enables BERT-like Masked Language Models As Generative Classifiers https://arxiv.org/abs/2502.03793
Читать полностью…MathArena: Evaluating LLMs on Uncontaminated Math Competitions https://matharena.ai/
Читать полностью…Gold-medalist Performance in Solving Olympiad Geometry with AlphaGeometry2 https://arxiv.org/abs/2502.03544
via @seeallochnaya
Empowering deep neural quantum states through efficient optimization https://www.nature.com/articles/s41567-024-02566-1
Читать полностью…Improving Vision-Language-Action Model with Online Reinforcement Learning https://arxiv.org/abs/2501.16664
Читать полностью…Constraints on the location of the liquid–liquid critical point in water https://www.nature.com/articles/s41567-024-02761-0
Читать полностью…LLMs can see and hear without any training https://arxiv.org/abs/2501.18096
Читать полностью…ReferDINO: Referring Video Object Segmentation with Visual Grounding Foundations https://arxiv.org/abs/2501.14607
Читать полностью…Roadmap to fault tolerant quantum computation using topological qubit arrays https://arxiv.org/abs/2502.12252
Читать полностью…Theory of correlated insulators and superconductor at ν = 1 in twisted WSe2 https://www.nature.com/articles/s41467-025-56816-8
Читать полностью…Что такое GIL в Python?
Кажется, один из золотых вопросов для всех питонистов на собеседованиях.
Обычно, на встречный вопрос "а что конкретно в питоне является GIL?" не может ответить ни один спрашивающий.
Сегодня мы закроем данный пробел в знаниях питонистов.
Global Interpreter Lock не позволяет работать более чем одному треду работать с Python API за раз. Его можно отключить через --disable-gil
в 3.13+, но сегодня мы про такое не будем.
Обратите внимание на ключевую фразу "c Python API". С системными треды могут и должны работать в режиме настоящей параллельности, без GIL. Что и позволяет получить ускорение при использовании threading
, когда C код поддерживает такой способ.
Знакомьтесь – вот структура GIL _gil_runtime_state
и поведение в ceval_gil.c
.
Как можно отпустить GIL?
На уровне C есть макросы: Py_BEGIN_ALLOW_THREADS и Py_END_ALLOW_THREADS, которые отпускают GIL в нужных местах. Пример из модуля mmap:
Py_BEGIN_ALLOW_THREADS
m_obj->data = mmap(NULL, map_size, prot, flags, fd, offset);
Py_END_ALLOW_THREADS
{
PyThreadState *_save;
_save = PyEval_SaveThread();
// your code here
PyEval_RestoreThread(_save);
}
PyThreadState
является текущим состоянием треда в CPython. Внутри хранится много контекста. Нас особо сильно интересует часть с полями про GIL:
struct PyThreadState {
struct {
unsigned int initialized:1;
/* Has been bound to an OS thread. */
unsigned int bound:1;
/* Has been unbound from its OS thread. */
unsigned int unbound:1;
/* Has been bound aa current for the GILState API. */
unsigned int bound_gilstate:1;
/* Currently in use (maybe holds the GIL). */
unsigned int active:1;
/* Currently holds the GIL. */
unsigned int holds_gil:1;
} _status;
// Thread state (_Py_THREAD_ATTACHED, _Py_THREAD_DETACHED, _Py_THREAD_SUSPENDED).
int state;
// ...
}
tstate->_status.active = 0;
tstate->_status.unbound = 1;
tstate->_status.holds_gil = 0;
tstate->state = detached_state;
_gil_runtime_state
. Py_DECREF
, и в тредах есть свой refcount, который работает локально, чтобы можно было его вызывать без GIL._threadmodule.c
.
_PyThreadState_Bind(tstate);
PyEval_AcquireThread(tstate);
_Py_atomic_add_ssize(&tstate->interp->threads.count, 1);
Gemstones: A Model Suite for Multi-Faceted Scaling Laws https://arxiv.org/abs/2502.06857
Читать полностью…MATH-Perturb: Benchmarking LLMs' Math Reasoning Abilities against Hard Perturbations https://arxiv.org/abs/2502.06453
Читать полностью…Chiral Instabilities in Driven-Dissipative Quantum Liquids https://arxiv.org/abs/2502.04443
Читать полностью…Amortized Planning with Large-Scale Transformers: A Case Study on Chess https://openreview.net/forum?id=XlpipUGygX
Читать полностью…Leveraging Online Olympiad-Level Math Problems for LLMS Training and Contamination-Resistant Evaluation https://livemathbench.github.io/
Читать полностью…Mathematical Foundations of Quantum Mechanics: An Advanced Short Course https://arxiv.org/abs/1508.06951
Читать полностью…Improving Transformer World Models for Data-Efficient RL https://arxiv.org/abs/2502.01591
Читать полностью…Goedel-Prover A New Frontier in Automated Theorem Proving https://goedel-lm.github.io/
Читать полностью…Physical Review Letters collection of the year 2024 https://promo.aps.org/PRL2024
Читать полностью…Improving Your Model Ranking on Chatbot Arena by Vote Rigging https://arxiv.org/abs/2501.17858
Читать полностью…