Untitled

 avatar
unknown
plain_text
12 days ago
2.2 kB
13
No Index
# go_test_pygame.sh

# after installing build tools; I googled it
# after git pull https://github.com/ggerganov/llama.cpp && cd llama.cpp 

cmake -B build
cmake --build build --config Release -j 4
# cmake --build build --config Release -t llama-server # to run the API
cmake --build build --config Release -t llama-cli # to run standalone tests

# after manual download of models to models/folder
MODELS="
models/Qwen2.5-Coder-32B-Instruct-Q8_0.gguf
models/Qwen2.5-Coder-32B-Instruct-Q5_K_M.gguf
models/Mistral-Small-24B-Instruct-2501-Q8_0.gguf
"

for SEED in 1 2 3 4 5 6 7 8 9; do
for MODEL in $MODELS; do 

# example from https://huggingface.co/unsloth/DeepSeek-R1-Distill-Qwen-32B-GGUF
# prompt from Reddit

./build/bin/llama-cli \ 
    --model $MODEL \
    --cache-type-k q8_0 \
    --threads 6 \
    --temp 0.2 \ 
    --top-p 0.95 \
    --seed $SEED \
    --ctx-size 32768 \
    --prompt '<|User|>
Using PyGame, open a window that is 4-inches square, with a black background, and create an equilateral triangle that is 2-inches per side, hollow, white lines. It is rotating clockwise at 6 degrees per second - to match that of a second-hand on a watch. Inside the equilateral triangle is a red ball, 1/8" in diameter. Unaffected by gravity, it is moving with an arbitrary speed, that is configurable in a variable. The ball has proper hitbox checking and can detect when it hits a wall. Hitting a wall should deflect/redirect the ball into the proper direction based on the angle of the wall that it hit and how it should deflect given the angle and speed of the wall. Be careful of bounds checking such that the ball does not get stuck outside a wall. Remember this is all in 2D space. Start with the ball located in the center of the triangle, initially moving in a random direction and with an initial speed of about 2 pixels per frame. To clarify, the triangle has three equal 2-inch sides moving at 6 degrees per second (not 6 degrees per frame), and the screen is 100 dpi. Review all the requirements, then begin coding.
<|Assistant|>' \
        -no-cnv 2>&1 | tee $(basename $MODEL)_pygame.out.$SEED.txt
done # with models
done # with seeds
Leave a Comment