Justine Tunney
e8de1e4766
Fix subtoken antiprompt scanning
2023-05-12 08:55:40 -07:00
Justine Tunney
80c174d494
Clean up llama.com anti/stop/reverse-prompt code
...
Example use case for JSON completion:
$ m=opt
$ make -j16 m=$m o/$m/third_party/ggml/llama.com
$ o/$m/third_party/ggml/llama.com -m llama.bin -p '{"key": "life", "val": ' -r '}'
42}
This provides better control. More sophisticated facilities for
controlling text generation will be provided soon enough.
2023-05-12 08:20:58 -07:00
Justine Tunney
bbfe4fbd11
Make llama.com n_predict be -1 by default
2023-05-12 08:20:34 -07:00
Justine Tunney
ca19ecf49c
Fine tune crash reports for llama.com
2023-05-12 06:24:26 -07:00
Justine Tunney
4edbc98811
Get MbedTLS and its unit tests passing AARCH64
2023-05-11 21:53:15 -07:00
Justine Tunney
5e2f7f7ced
Get LIBC_TESTLIB building on AARCH64
2023-05-11 19:57:09 -07:00
Justine Tunney
95fab334e4
Use yield on aarch in spin locks
2023-05-11 19:57:09 -07:00
Ariel Núñez
b3e3359d22
Import radpajama (a redpajama.cpp fork) ( #814 )
...
This is the relevant commit: bfa6466199
Model download links:
https://huggingface.co/ceonlabs/radpajama/tree/main
2023-05-11 07:12:08 -07:00
Justine Tunney
1f6f9e6701
Remove division from matrix multiplication
...
This change reduces llama.com CPU cycles systemically by 2.5% according
to the Linux Kernel `perf stat -Bddd` utility.
2023-05-10 21:19:54 -07:00
Justine Tunney
a88290e595
Make sure llama.com terminal cleanup happens
2023-05-10 15:56:01 -07:00
Justine Tunney
5250feb7ad
There must only be one strerror()
2023-05-10 15:34:13 -07:00
Justine Tunney
bb3ebedfce
Fix load time measurement
2023-05-10 07:54:21 -07:00
Justine Tunney
290a49952e
Fix some more issues with aarch64 and llama.cpp
2023-05-10 07:34:26 -07:00
Justine Tunney
12a33858c9
There must be only one clock()
2023-05-10 06:16:01 -07:00
Justine Tunney
6cb9553706
Fix alignment bug in llama.com
2023-05-10 06:15:32 -07:00
Justine Tunney
ca990ef091
Make llama.com -h
print to stdout
2023-05-10 04:55:59 -07:00
Justine Tunney
5f57fc1f59
Upgrade llama.cpp to e6a46b0ed1884c77267dc70693183e3b7164e0e0
2023-05-10 04:20:48 -07:00
Justine Tunney
86d9323a43
Remove sys_getrandom() on NetBSD
...
This fixes an apparent regression caused by
3f0bcdc3ef
where getrandom() on NetBSD 9.2
doesn't appear to work; ktrace oddly reports:
1446 1 .ape CALL #91 (unimplemented getdopt)
1446 1 .ape RET #91 (unimplemented getdopt) -1 errno 78
Function not implemented
1446 1 .ape PSIG SIGSYS SIG_DFL: code=SI_NOINFO
2023-05-10 04:20:47 -07:00
Justine Tunney
a0237a017c
Get llama.com working on aarch64
2023-05-10 04:20:47 -07:00
Justine Tunney
4c093155a3
Get llama.com building as an aarch64 native binary
2023-05-10 04:20:47 -07:00
Justine Tunney
d04430f4ef
Get LIBC_MEM and LIBC_STDIO building with aarch64
2023-05-10 04:20:47 -07:00
Justine Tunney
ae0ee59614
Get aarch64 hello world working
...
$ m=aarch64-tiny
$ make -j8 m=$m o/$m/tool/hello/hello.com o/third_party/qemu/qemu-aarch64
$ o/third_party/qemu/qemu-aarch64 o/$m/tool/hello/hello.com
hello world
$ ls -hal o/$m/tool/hello/hello.com
-rwxr-xr-x 1 jart jart 4.0K May 9 05:04 o/aarch64-tiny/tool/hello/hello.com
2023-05-10 04:20:47 -07:00
Justine Tunney
e5e3cdf447
Get LIBC_RUNTIME and LIBC_CALLS building on aarch64
2023-05-10 04:20:47 -07:00
Justine Tunney
036b9a0002
Make further progress on non-x86 support
2023-05-10 04:20:47 -07:00
Justine Tunney
135080fd3e
Get libc/tinymath/ compiling on aarch64
2023-05-10 04:20:46 -07:00
Justine Tunney
2b73e72d59
Make more code aarch64 friendly
2023-05-10 04:20:46 -07:00
Justine Tunney
ca2860947f
Make progress towards aarch64 build
2023-05-10 04:20:46 -07:00
Justine Tunney
08ff26c817
Add qemu-aarch64
2023-05-10 04:20:46 -07:00
Justine Tunney
57cc257f58
Vendor musl-cross-make gcc 9.2.0 aarch64
2023-05-10 04:20:46 -07:00
Justine Tunney
12438cce16
Fix regression with Python linker eaxmples
...
We can once again create 2mb statically-linked Python binaries:
$ make -j8 m=tiny o/tiny/examples/pyapp/pyapp.com
$ ls -hal o/tiny/examples/pyapp/pyapp.com
-rwxr-xr-x 1 jart jart 2.1M May 1 14:04 o/tiny/examples/pyapp/pyapp.com
$ o/tiny/examples/pyapp/pyapp.com
cosmopolitan is cool!
The regression was caused by Python thread support in b15f9eb58
2023-05-01 14:12:15 -07:00
Justine Tunney
3dac9f8999
Use Companion AI in llama.com by default
2023-04-30 23:08:15 -07:00
Justine Tunney
d9e27203d4
Incorporate some fixes and updates for GGML
2023-04-28 20:24:55 -07:00
Justine Tunney
b31ba86ace
Introduce prompt caching so prompts load instantly
...
This change also introduces an ephemeral status line in non-verbose mode
to display a load percentage status when slow operations are happening.
2023-04-28 16:15:26 -07:00
Justine Tunney
1c2da3a55a
Make shell usability improvements to llama.cpp
...
- Introduce -v and --verbose flags
- Don't print stats / diagnostics unless -v is passed
- Reduce --top_p default from 0.95 to 0.70
- Change --reverse-prompt to no longer imply --interactive
- Permit --reverse-prompt specifying custom EOS if non-interactive
2023-04-28 02:54:11 -07:00
Justine Tunney
420f889ac3
Further optimize the math library
...
The sincosf() function is now twice as fast, thanks to ARM Limited. The
same might also be true of logf() and expm1f() which have been updated.
2023-04-28 01:20:47 -07:00
Justine Tunney
e8b43903b2
Import llama.cpp
...
https://github.com/ggerganov/llama.cpp
0b2da20538d01926b77ea237dd1c930c4d20b686
See third_party/ggml/README.cosmo for changes
2023-04-27 14:37:14 -07:00
Justine Tunney
7c9ef924bf
Add more sorting algorithms
2023-04-27 05:44:44 -07:00
Justine Tunney
b7bf052a4b
Add Intel intrinsics headers
2023-04-27 05:44:38 -07:00
Justine Tunney
369f9740de
Run clang-format on most sources
2023-04-27 05:44:32 -07:00
Gautham
1a839ba41d
add os.geteuid to python ( #806 )
2023-04-24 20:15:24 -07:00
Justine Tunney
3e702e8f65
Push new rolling release
2023-04-18 05:11:15 -07:00
Ariel Núñez
893703a07b
Fix import asyncio
( #763 )
2023-03-11 23:29:03 -08:00
Justine Tunney
ba180e754d
Improve cosmocc toolchain
...
- Decouple zlib from libc
- Add some underscores to mostly internal names
2023-03-05 23:52:49 -08:00
Justine Tunney
ad97d7b9db
Disable Python test_sys
2023-02-23 08:56:31 -08:00
Justine Tunney
18a24935cc
Fix Python stack overflow checking in MODE=dbg
2023-02-23 08:13:33 -08:00
Justine Tunney
7355499a6a
Remove a misplaced include
2023-02-23 08:10:38 -08:00
Justine Tunney
b15f9eb58f
Improve Python's threading story
...
Python threads are now generally working, however some parts of Python's
regression tests for threads are flaky. This is possibly due to needing
more locking primitives in Cosmo's IO system call wrappers, e.g. close.
make o//third_party/python/Lib/test/test_threading.py.runs
See #747
2023-02-23 06:55:54 -08:00
ahgamut
60eb34509b
quick addition of cosmo pthreads to python.com
...
- enable WITH_THREAD and _POSIX_THREADS
- add headers everywhere
- breaks only two tests (faulthandler and signal)
- disabled terminal completion because it causes segfaults for some
reason (probably could not get the current thread)
2023-02-23 06:55:17 -08:00
Justine Tunney
2b6261a52d
Make some system call fixes
...
- Fix minor ABI issue with SIOCGIFCONF
- Fix ABI translation issues with statfs() on BSDs
- Fix SQLite angled header line
2023-02-12 22:16:34 -08:00
Justine Tunney
1429a7b3ef
Fix bug in ASAN reporting
2023-02-02 02:28:58 -08:00