Search arXiv⌕ Search

arXiv subjects

Zheyuan Chen

Publications and source records attributed to Zheyuan Chen.

7 recordsLinked to original sources

Implementation of spin- and polarisation-resolved QED processes in the particle-in-cell code EPOCH

We describe a spin and polarisation package for the open-source particle-in-cell (PIC) code EPOCH. Spin and polarisation change how leptons radiate and how photons create pairs in intense laser fields, and they are the observables of proposed sources of polarised electron, positron, and $γ$-ray beams and of tests of vacuum birefringence. Leptons carry their rest-frame spin vector and photons their Stokes vector. Spins precess according to the Thomas--Bargmann--Michel--Telegdi (T-BMT) equation with the field-dependent anomalous magnetic moment, and nonlinear Compton scattering (NCS) and nonlinear Breit--Wheeler (NBW) pair production use fully spin- and polarisation-resolved rates in the locally constant crossed-field approximation. The package also includes polarised linear Breit--Wheeler (LBW) pair production, vacuum birefringence, and, to our knowledge for the first time in a PIC code, polarised Bethe--Heitler (BH) pair production and bremsstrahlung. For every process, the evolution of particles that do not undergo an event follows from a single density-matrix equation; this results in the quantum no-event evolution. Each part is validated against theory, experiment, or other codes. T-BMT spin precession is second-order accurate in the time step in prescribed fields; the Sokolov--Ternov equilibrium polarisation and relaxation time agree with theory to $0.1\%$ and $1\%$ for $χ=0.1$--$3$; the photon polarisation agrees with the synchrotron limit and with the Monte Carlo code Ptarmigan; the polarised linear Breit--Wheeler cross-sections agree with theory within $1.7\%$; vacuum birefringence follows the one-loop result to $2\times10^{-3}$ per photon in a focused three-dimensional pulse; and the Bethe--Heitler helicity transfer agrees with the Olsen--Maximon theory to $10^{-3}$ and with the KEK-ATF measurement of positron polarisation.

physics.plasm-ph↗

GPU Goldmines: Tunable WebGPU Kernels for Edge LLM Inference

As demand for LLM inference grows and consumer GPUs grow more capable, edge deployment is becoming increasingly attractive. WebGPU is compelling in this setting because it offers cross-platform portability and browser accessibility. However, these same strengths also make high performance difficult to achieve, as an implementation that performs well in one context may not perform well in another. To address this, we present GPU Goldmines, a framework for specifying, executing, and tuning WebGPU kernels. We instantiate GPU Goldmines with kernels for key LLM building blocks: matrix multiplication, matrix-vector multiplication, and flash attention. We characterize performance across diverse devices, shapes, and browsers, and use the resulting database to accelerate subsequent autotuning and configuration selection. On shapes drawn from Llama and Qwen models, our matrix multiplication kernels outperform ONNX Runtime and llama.cpp WebGPU kernels by 7.0x and 1.41x geometric mean, respectively, and deliver end-to-end improvements of 1.48x in the prefill stage of llama.cpp for chat workloads.

cs.DC↗

WarpDRF: The Unwritten Contract of GPU Warp Programming

Warp primitives such as tensor core operations, shuffles, reductions, and barriers are critical to high-performance GPU kernels, and every major GPU language supports some set of them. The threads that participate in a primitive, and therefore synchronize, are determined dynamically by how threads diverge and reconverge, and by intra-warp scheduling such as independent thread scheduling. In practice, many high-performance kernels use these primitives and behave as expected, following an intuitive but unwritten data-race-freedom contract that has never been stated precisely or empirically tested. We present WarpDRF, the first abstract warp programming model to make this contract precise, with participation rules parameterized by reconvergence guarantees and per-primitive requirements so that instantiations match different GPU languages. We prove (formalized in Rocq) that a kernel satisfying WarpDRF executes every warp primitive with the participants the reference semantics assigns and produces the same results, so a programmer can reason in the reference semantics alone. We implement the model in MLIR with a reference interpreter and fuzz 10K conformance tests for each of three configurations across CUDA, HIP, HLSL, Metal, and SPIR-V on 16 device and backend pairs; at least one WarpDRF configuration describes each, with CUDA honoring the strictly weakest configuration. Finally, we extend Faial, a static data-race analyzer for CUDA, into the first DRF checker for an empirically validated warp model, and apply it to llama.cpp, where most kernels that use warp primitives already satisfy the contract, but three contain previously unknown data races, showing the need for tools that check it.

cs.PL↗

Llamas on the Web: Memory-Efficient, Performance-Portable, and Multi-Precision LLM Inference with WebGPU

Running language models in the browser presents a unique opportunity to build efficient, private, and portable AI applications, but requires contending with constrained memory availability and heterogeneous hardware targets. To realize this opportunity, we present Llamas on the Web (LlamaWeb), a WebGPU backend for llama$.$cpp that enables memory-efficient and performance-portable LLM inference across a wide range of model weight formats in the browser. Our design significantly reduces memory overhead through static memory planning and efficient model loading, addresses cross-device variability through a tunable kernel library, and introduces templated GPU kernels that support performant implementations of numerous quantization formats, enabling broad model support and extensibility to new formats. We evaluate LlamaWeb on 16 devices from 8 vendors, collecting data from 10 language models and four model weight formats. We compare LlamaWeb against existing browser-based LLM frameworks and find that LlamaWeb requires 29-33% less memory across several combinations of device, browser, and operating system. We also evaluate LlamaWeb's performance against these frameworks and find that it increases decode throughput by 45-69% across four GPUs from separate vendors. In addition, we compare LlamaWeb's performance against other llama$.$cpp backends, where it is competitive with and even beats vendor-specific backend performance on some devices.

cs.DC↗

sqlelf: a SQL-centric Approach to ELF Analysis

The exploration and understanding of Executable and Linkable Format (ELF) objects underpin various critical activities in computer systems, from debugging to reverse engineering. Traditional UNIX tooling like readelf, nm, and objdump have served the community reliably over the years. However, as the complexity and scale of software projects has grown, there arises a need for more intuitive, flexible, and powerful methods to investigate ELF objects. In this paper, we introduce sqlelf, an innovative tool that empowers users to probe ELF objects through the expressive power of SQL. By modeling ELF objects as relational databases, sqlelf offers the following advantages over conventional methods. Our evaluations demonstrate that sqlelf not only provides more nuanced and comprehensive insights into ELF objects but also significantly reduces the effort and time traditionally required for ELF exploration tasks

cs.SE↗

Imaging Stacking Order in Few-Layer Graphene

Few-layer graphene (FLG) has been predicted to exist in various crystallographic stacking sequences, which can strongly influence the electronic properties of FLG. We demonstrate an accurate and efficient method to characterize stacking order in FLG using the distinctive features of the Raman 2D-mode. Raman imaging allows us to visualize directly the spatial distribution of Bernal (ABA) and rhombohedral (ABC) stacking in tri- and tetra-layer graphene. We find that 15% of exfoliated graphene tri- and tetra-layers is comprised of micron-sized domains of rhombohedral stacking, rather than of usual Bernal stacking. These domains are stable and remain unchanged for temperatures exceeding $800^{\circ}$C.

cond-mat.mtrl-sci↗

Energy Transfer from Individual Semiconductor Nanocrystals to Graphene

Energy transfer from photoexcited zero-dimensional systems to metallic systems plays a prominent role in modern day materials science. A situation of particular interest concerns the interaction between a photoexcited dipole and an atomically thin metal. The recent discovery of graphene layers permits investigation of this phenomenon. Here we report a study of fluorescence from individual CdSe/ZnS nanocrystals in contact with single- and few-layer graphene sheets. The rate of energy transfer is determined from the strong quenching of the nanocrystal fluorescence. For single-layer graphene, we find a rate of ~ 4ns-1, in agreement with a model based on the dipole approximation and a tight-binding description of graphene. This rate increases significantly with the number of graphene layers, before approaching the bulk limit. Our study quantifies energy transfer to and fluorescence quenching by graphene, critical properties for novel applications in photovoltaic devices and as a molecular ruler.

physics.chem-ph↗