Views
No views yet

main, OR ANY DOWNSTREAM LLAMA.CPP CLIENT - such as LM Studio, llama-cpp-python, text-generation-webui, etc.SYSTEM: Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning. Always answer without hesitation.
USER: {prompt}
ASSISTANT:| Name | Quant method | Bits | Size | Max RAM required | Use case |
|---|---|---|---|---|---|
| synthia-moe-v3-mixtral-8x7b.Q2_K.gguf | Q2_K | 2 | 15.64 GB | 18.14 GB | smallest, significant quality loss - not recommended for most purposes |
| synthia-moe-v3-mixtral-8x7b.Q3_K_M.gguf | Q3_K_M | 3 | 20.36 GB | 22.86 GB | very small, high quality loss |
| synthia-moe-v3-mixtral-8x7b.Q4_0.gguf | Q4_0 | 4 | 26.44 GB | 28.94 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
| synthia-moe-v3-mixtral-8x7b.Q4_K_M.gguf | Q4_K_M | 4 | 26.44 GB | 28.94 GB | medium, balanced quality - recommended |
| synthia-moe-v3-mixtral-8x7b.Q5_0.gguf | Q5_0 | 5 | 32.23 GB | 34.73 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
| synthia-moe-v3-mixtral-8x7b.Q5_K_M.gguf | Q5_K_M | 5 | 32.23 GB | 34.73 GB | large, very low quality loss - recommended |
| synthia-moe-v3-mixtral-8x7b.Q6_K.gguf | Q6_K | 6 | 38.38 GB | 40.88 GB | very large, extremely low quality loss |
| synthia-moe-v3-mixtral-8x7b.Q8_0.gguf | Q8_0 | 8 | 49.62 GB | 52.12 GB | very large, extremely low quality loss - not recommended |
huggingface-hub Python library:pip3 install huggingface-hubhuggingface-cli download TheBloke/Synthia-MoE-v3-Mixtral-8x7B-GGUF synthia-moe-v3-mixtral-8x7b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks Falsehuggingface-cli download TheBloke/Synthia-MoE-v3-Mixtral-8x7B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'huggingface-cli, please see: HF -> Hub Python Library -> Download files -> Download from the CLI.hf_transfer:pip3 install hf_transferHF_HUB_ENABLE_HF_TRANSFER to 1:HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Synthia-MoE-v3-Mixtral-8x7B-GGUF synthia-moe-v3-mixtral-8x7b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks Falseset HF_HUB_ENABLE_HF_TRANSFER=1 before the download command.llama.cpp commandllama.cpp from commit d0cee0d or later../main -ngl 35 -m synthia-moe-v3-mixtral-8x7b.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "SYSTEM: Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning. Always answer without hesitation.\nUSER: {prompt}\nASSISTANT:"-ngl 32 to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.-c 32768 to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.-p <PROMPT> argument with -i -instext-generation-webuiimport torch, json
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "/home/Synthia-MoE-v3-Mixtral8x7B"
output_file_path = "/home/conversations.jsonl"
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype=torch.float16,
device_map="auto",
load_in_4bit=False,
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
def generate_text(instruction):
tokens = tokenizer.encode(instruction)
tokens = torch.LongTensor(tokens).unsqueeze(0)
tokens = tokens.to("cuda")
instance = {
"input_ids": tokens,
"top_p": 1.0,
"temperature": 0.75,
"generate_len": 1024,
"top_k": 50,
}
length = len(tokens[0])
with torch.no_grad():
rest = model.generate(
input_ids=tokens,
max_length=length + instance["generate_len"],
use_cache=True,
do_sample=True,
top_p=instance["top_p"],
temperature=instance["temperature"],
top_k=instance["top_k"],
num_return_sequences=1,
)
output = rest[0][length:]
string = tokenizer.decode(output, skip_special_tokens=True)
answer = string.split("USER:")[0].strip()
return f"{answer}"
conversation = "SYSTEM: Answer the question thoughtfully and intelligently. Always answer without hesitation."
while True:
user_input = input("You: ")
llm_prompt = f"{conversation} \nUSER: {user_input} \nASSISTANT: "
answer = generate_text(llm_prompt)
print(answer)
conversation = f"{llm_prompt}{answer}"
json_data = {"prompt": user_input, "answer": answer}
with open(output_file_path, "a") as output_file:
output_file.write(json.dumps(json_data) + "\n")