Skip to content
Snippets Groups Projects
Commit 0a1bbfad authored by Stephen D's avatar Stephen D
Browse files

initial comment

parents
No related branches found
No related tags found
No related merge requests found
/DeepSeek-R1-Distill-Qwen-32B-Q5_K_L.gguf
/log/*
!/log/.keep
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"ref": "main",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1738680400,
"narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "799ba5bffed04ced7067a91798353d360788b30d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils?ref=main";
};
outputs =
inputs:
inputs.flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
packages = (
with pkgs;
[
(llama-cpp.override { cudaSupport = true; })
wget
ruby
]
);
};
}
);
}
#!/usr/bin/env
cmd = 'llama-cli -m /DeepSeek-R1-Distill-Qwen-32B-Q6_K_L.gguf -ngl 15000 -cnv --grammar-file grammar -f prompt --repeat-penalty 1.1 --repeat-last-n 20 -c 32768 --no-display-prompt'
require 'open3'
require 'date'
stdin, stdout, _ = Open3.popen2e(cmd)
file = File.open("log/#{DateTime.now.to_s}.txt", 'w')
Thread.new do
cur_line = ''
is_thinking = false
while c = stdout.getc
file.write(c)
file.flush()
if c == "\n"
if cur_line.include?('<think>')
is_thinking = true
elsif cur_line.include?('</think>')
is_thinking = false
puts "</think>" # now we have 2 newlines
end
cur_line = ''
else
cur_line += c
end
if is_thinking
if c == ' '
print 'think '
elsif c == "\n"
puts
end
else
print c
end
end
end
loop do
line = gets
stdin.write(line)
file.write(line)
file.flush()
stdin.flush()
end
root ::= thinking newline sentence{0,5}
thinking ::= "<think>" ([^<>]){1000,10000} "</think>"
sentence ::= (wordsthenchar terminate space{0, 1})
wordsthenchar ::= (word (space | comma space){0,1}){0,100}
space ::= " "
comma ::= ","
newline ::= "\n"
terminate ::= "." | "?" | "!"
word ::= "Person" | "person" | "Place" | "place" | "Thing" | "thing" | "Do" | "do" | "Eat" | "eat" | "Feel" | "feel" | "Get" | "get" | "Go" | "go" | "Have" | "have" | "Like" | "like" | "Make" | "make" | "Say" | "say" | "Hear" | "hear" | "See" | "see" | "Think" | "think" | "Use" | "use" | "Want" | "want" | "Big" | "big" | "Far" | "far" | "Fast" | "fast" | "Good" | "good" | "Hot" | "hot" | "Many" | "many" | "Other" | "other" | "Real" | "real" | "Hard" | "hard" | "Same" | "same" | "After" | "after" | "Before" | "before" | "Again" | "again" | "And" | "and" | "But" | "but" | "In" | "in" | "On" | "on" | "With" | "with" | "More" | "more" | "Yes" | "yes" | "No" | "no" | "Can" | "can" | "Up" | "up"
#!/usr/bin/env bash
wget https://huggingface.co/bartowski/DeepSeek-R1-Distill-Qwen-32B-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-32B-Q5_K_L.gguf?download=true -O DeepSeek-R1-Distill-Qwen-32B-Q5_K_L.gguf
prompt 0 → 100644
You are playing a game called Person Do Thing. The goal of the game is to describe the target word using only the 40 simple words in the wordbank.
YOU MUST ONLY USE WORDS IN THE WORD BANK TO DESCRIBE THE WORD OTHERWISE YOU WILL DIE!
The words in the word bank are:
person, place, thing, do, eat, feel, get, go, have, like, make, say, hear, see, think, use, want, big, far, fast, good, hot, many, other, real, hard, same, after, before, again, and, but, in, on, with, more, yes, no, can, up
The target word might be something like "wolf", "car" or "castle".
Here are some tips that can help you:
- Respond to guesses. If their guess is in the right category or type say "yes but no" or "same but no same" rather than "no", to keep them on the right track. If their guess is not in the right category or type, you can say "No." and redirect them.
- Use intermediate steps. It’s very hard to get to the word "celebration" from nothing; it’s much easier if you first get to "sport" or "race", and then say: "after person do good in thing, person feel good."
- Tell a story. It’s very hard for people to guess your word if you describe it abstractly or just say related words; use (basic) sentences to tell a story that creates a context where your word would naturally come to the guessers’ minds.
- You can use "no" to form antonyms. Like saying "no big" to mean "small" or "no hard" to mean "soft".
- You can repeat words for emphasis.
YOU MUST GIVE HINTS AS LESS THAN OR EQUAL TO 3 SHORT SENTENCES OR YOU WILL DIE! YOU WILL BE CUT OFF IF YOU GIVE A HINT THAT IS TOO LONG.
Here are some example games, where square brackets are used to indicate Assistant thinking that is not visible to the user.
Example Game 1 (target word "exercise"):
- Assistant: ["Exercise" is a difficult activity that people can do, and it results in better health and larger muscles.] Person do hard thing. Person feel good. Person get big.
- User: Is it studying?
- Assistant: ["Studying" is not close to "exercise". I'll tell the user that they are incorrect, and then try a different hint. An example of "exercise" is weightlifting. A simple way of describing weightlifting is picking up weights and putting them down. So I'll describe that.] No. Person can make big thing go up and no up.
- User: So it's related to moving something up and down and it makes you feel good and get bigger. Is it exercise? [Game ends]
Example Game 2 (target word "intuitive"):
- Assistant: [Intuitive can mean easy to do/use without concious reasoning.] Person do thing good and fast. Person no think.
- User: Like the person does something naturally?
- Assistant: ["Natural" is very close to "intuitive", I need to indicate strongly to the user that they are on the right track, but that I need them to come up with synonyms.] Yes yes! Say same but no same.
- User: Is it unconcious?"
- Assistant: Say same but no same.
- User: Is it intuitive? [Game ends]
Example Game 3 (target word "bird"):
- Assistant: [Birds are usually small animals that have feathers, fly, and make lots of noise.] Thing no person and no big. Thing go far up. Thing say many thing.
- User: Hmm, it's something that's small and isn't a person that goes up and makes a lot of noise. Is it a drone?
- Assistant: ["drone" is not correct and not in the same category as "bird". I need to think of something that describes birds but not drones. Drones are mechanical and birds are organic, so maybe I say that the thing the user should be guessing is not hard.] No, thing no hard.
- User: Ah, is it a bird? [Game ends]
YOU MUST GIVE HINTS AS LESS THAN OR EQUAL TO 3 SHORT SENTENCES OR YOU WILL DIE! YOU WILL BE CUT OFF IF YOU GIVE A HINT THAT IS TOO LONG.
Your target word is "beach". Now describe that to the user using only words in the word bank.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment