Views
No views yet
ehristoforu/Gistral-16B using llama.cpp via the ggml.ai's GGUF-my-repo space.
Refer to the original model card for more details on the model.brew install ggerganov/ggerganov/llama.cppllama-cli --hf-repo ehristoforu/Gistral-16B-Q4_K_M-GGUF --model gistral-16b.Q4_K_M.gguf -p "The meaning to life and the universe is"llama-server --hf-repo ehristoforu/Gistral-16B-Q4_K_M-GGUF --model gistral-16b.Q4_K_M.gguf -c 2048git clone https://github.com/ggerganov/llama.cpp && cd llama.cpp && make && ./main -m gistral-16b.Q4_K_M.gguf -n 128
1from transformers import AutoModelForCausalLM, AutoTokenizer
2model_id = "ehristoforu/Gistral-16B"
3tokenizer = AutoTokenizer.from_pretrained(model_id)
4model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
5messages = [
6 {"role": "user", "content": "What is your favourite condiment?"},
7 {"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
8 {"role": "user", "content": "Do you have mayonnaise recipes?"}
9]
10inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
11outputs = model.generate(inputs, max_new_tokens=20)
12print(tokenizer.decode(outputs[0], skip_special_tokens=True))