Skip to content

armgit / janas

Public Imported from GitHub
0

37 tok/s from Qwen3-Next-80B (48 GB) on a 32 GB laptop, 24 without drafts vs 2.8 for llama.cpp; reading 62 vs 16 tok/s. Faster than llama.cpp on all 13 models compared in Q4_K_M. LLMs bigger than your RAM, pure C, CPU or GPU.

609 B
Raw Blame
/* SPDX-License-Identifier: GPL-3.0-or-later
   Copyright (C) 2026 Maurizio Cammalleri */
/*
 * reopen.h - a file opened again from a descriptor of it, for reading:
 * with direct I/O (O_DIRECT, Windows's unbuffered and overlapped reads) or
 * through the system's cache. The new descriptor is independent of the
 * old one (its own position, its own flags).
 */
#ifndef JANAS_COMMON_REOPEN_H
#define JANAS_COMMON_REOPEN_H

/* A new read-only descriptor of fd's file, or -1. Direct: the reads must
   be aligned as O_DIRECT's (offset, length and buffer). */
int janas_reopen_read(int fd, int direct);

#endif