Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| Vikhr-7B-instruct_0.4.Q2_K.gguf | Q2_K | 2.74GB |
| Vikhr-7B-instruct_0.4.IQ3_XS.gguf | IQ3_XS | 3.04GB |
| Vikhr-7B-instruct_0.4.IQ3_S.gguf | IQ3_S | 3.19GB |
| Vikhr-7B-instruct_0.4.Q3_K_S.gguf | Q3_K_S | 3.17GB |
| Vikhr-7B-instruct_0.4.IQ3_M.gguf | IQ3_M | 3.29GB |
| Vikhr-7B-instruct_0.4.Q3_K.gguf | Q3_K | 3.5GB |
| Vikhr-7B-instruct_0.4.Q3_K_M.gguf | Q3_K_M | 3.5GB |
| Vikhr-7B-instruct_0.4.Q3_K_L.gguf | Q3_K_L | 3.79GB |
| Vikhr-7B-instruct_0.4.IQ4_XS.gguf | IQ4_XS | 3.92GB |
| Vikhr-7B-instruct_0.4.Q4_0.gguf | Q4_0 | 4.08GB |
| Vikhr-7B-instruct_0.4.IQ4_NL.gguf | IQ4_NL | 4.12GB |
| Vikhr-7B-instruct_0.4.Q4_K_S.gguf | Q4_K_S | 4.11GB |
| Vikhr-7B-instruct_0.4.Q4_K.gguf | Q4_K | 4.32GB |
| Vikhr-7B-instruct_0.4.Q4_K_M.gguf | Q4_K_M | 4.32GB |
| Vikhr-7B-instruct_0.4.Q4_1.gguf | Q4_1 | 4.5GB |
| Vikhr-7B-instruct_0.4.Q5_0.gguf | Q5_0 | 4.93GB |
| Vikhr-7B-instruct_0.4.Q5_K_S.gguf | Q5_K_S | 4.93GB |
| Vikhr-7B-instruct_0.4.Q5_K.gguf | Q5_K | 5.05GB |
| Vikhr-7B-instruct_0.4.Q5_K_M.gguf | Q5_K_M | 5.05GB |
| Vikhr-7B-instruct_0.4.Q5_1.gguf | Q5_1 | 5.35GB |
| Vikhr-7B-instruct_0.4.Q6_K.gguf | Q6_K | 5.83GB |
1
2
3from transformers import AutoTokenizer, AutoModelForCausalLM
4import torch
5model = AutoModelForCausalLM.from_pretrained("AlexWortega/v5-it",
6 device_map="auto",
7 attn_implementation="flash_attention_2",
8 torch_dtype=torch.bfloat16)
9
10tokenizer = AutoTokenizer.from_pretrained("AlexWortega/v5-it")
11from transformers import AutoTokenizer, pipeline
12pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
13prompts = [
14 "В чем разница между фруктом и овощем?",
15 "Годы жизни колмагорова?"]
16
17def test_inference(prompt):
18 prompt = pipe.tokenizer.apply_chat_template([{"role": "user", "content": prompt}], tokenize=False, add_generation_prompt=True)
19 print(prompt)
20 outputs = pipe(prompt, max_new_tokens=512, do_sample=True, num_beams=1, temperature=0.25, top_k=50, top_p=0.98, eos_token_id=79097)
21 return outputs[0]['generated_text'][len(prompt):].strip()
22
23
24for prompt in prompts:
25 print(f" prompt:\n{prompt}")
26 print(f" response:\n{test_inference(prompt)}")
27 print("-"*50)
28