#! /bin/zsh # # this file: # https://dataswamp.org/~incal/ai/ori # # about: # Find the most original sentence in a text file. # It is all CLI, all FOSS, and all local. # - by incal 2024-07-14 # # uses: # mistral-7b-instruct-v0.2.Q5_K_M.llamafile # llamafile v0.8.5 # # usage: # $ ori input.txt src=$1 dst=${src:r}-ori.${src:e} query="What is the most original sentence above?" prompt="Context: $(cat $src) Query: ${query}" taskset -c 0-2 \ llm \ --cli \ --log-disable \ --prompt-cache-all \ --silent-prompt \ -c 2048 \ -ngl 9999 \ -p $prompt | tee $dst