mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-09-10 02:33:49 +00:00
Use Companion AI in llama.com by default
This commit is contained in:
parent
d9e27203d4
commit
3dac9f8999
8 changed files with 310 additions and 193 deletions
3
third_party/ggml/llama_util.h
vendored
3
third_party/ggml/llama_util.h
vendored
|
@ -4,6 +4,7 @@
|
|||
#ifndef LLAMA_UTIL_H
|
||||
#define LLAMA_UTIL_H
|
||||
#include "libc/calls/struct/rlimit.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/runtime/sysconf.h"
|
||||
#include "libc/sysv/consts/madv.h"
|
||||
|
@ -163,7 +164,7 @@ struct llama_mmap {
|
|||
Die("mmap failed: %s", strerror(errno));
|
||||
}
|
||||
|
||||
if (prefetch) {
|
||||
if (prefetch && !IsWindows()) {
|
||||
// Advise the kernel to preload the mapped memory
|
||||
if (madvise(addr, file->size, MADV_WILLNEED)) {
|
||||
fprintf(stderr, "warning: madvise(.., MADV_WILLNEED) failed: %s\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue