Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| Maral-7B-alpha-1.Q2_K.gguf | Q2_K | 2.53GB |
| Maral-7B-alpha-1.IQ3_XS.gguf | IQ3_XS | 2.81GB |
| Maral-7B-alpha-1.IQ3_S.gguf | IQ3_S | 2.96GB |
| Maral-7B-alpha-1.Q3_K_S.gguf | Q3_K_S | 2.95GB |
| Maral-7B-alpha-1.IQ3_M.gguf | IQ3_M | 3.06GB |
| Maral-7B-alpha-1.Q3_K.gguf | Q3_K | 3.28GB |
| Maral-7B-alpha-1.Q3_K_M.gguf | Q3_K_M | 3.28GB |
| Maral-7B-alpha-1.Q3_K_L.gguf | Q3_K_L | 3.56GB |
| Maral-7B-alpha-1.IQ4_XS.gguf | IQ4_XS | 3.67GB |
| Maral-7B-alpha-1.Q4_0.gguf | Q4_0 | 3.83GB |
| Maral-7B-alpha-1.IQ4_NL.gguf | IQ4_NL | 3.87GB |
| Maral-7B-alpha-1.Q4_K_S.gguf | Q4_K_S | 3.86GB |
| Maral-7B-alpha-1.Q4_K.gguf | Q4_K | 4.07GB |
| Maral-7B-alpha-1.Q4_K_M.gguf | Q4_K_M | 4.07GB |
| Maral-7B-alpha-1.Q4_1.gguf | Q4_1 | 4.24GB |
| Maral-7B-alpha-1.Q5_0.gguf | Q5_0 | 4.65GB |
| Maral-7B-alpha-1.Q5_K_S.gguf | Q5_K_S | 4.65GB |
| Maral-7B-alpha-1.Q5_K.gguf | Q5_K | 4.78GB |
| Maral-7B-alpha-1.Q5_K_M.gguf | Q5_K_M | 4.78GB |
| Maral-7B-alpha-1.Q5_1.gguf | Q5_1 | 5.07GB |
| Maral-7B-alpha-1.Q6_K.gguf | Q6_K | 5.53GB |
| Maral-7B-alpha-1.Q8_0.gguf | Q8_0 | 7.17GB |

### Human: <prompt>
### Assistant: <answer>1prompt = "در سال ۱۹۹۶ چه کسی رییس جمهور آمریکا بود؟"
2prompt = f"### Human:{prompt}\n### Assistant:"pip install transformers accelerate bitsandbytesbitsandbytes library is only needed for 8 bit version. Otherwise, it's not necessary.1from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
2import torch
3
4model_name_or_id = "MaralGPT/Maral-7B-alpha-1"
5
6model = AutoModelForCausalLM.from_pretrained(model_name_or_id, torch_dtype=torch.bfloat16, device_map="auto")
7tokenizer = AutoTokenizer.from_pretrained(model_name_or_id)
8
9prompt = "در سال ۱۹۹۶ چه کسی رییس جمهور آمریکا بود؟"
10prompt = f"### Human:{prompt}\n### Assistant:"
11
12inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
13
14generation_config = GenerationConfig(
15 do_sample=True,
16 top_k=1,
17 temperature=0.5,
18 max_new_tokens=300,
19 pad_token_id=tokenizer.eos_token_id
20)
21
22outputs = model.generate(**inputs, generation_config=generation_config)
23print(tokenizer.decode(outputs[0], skip_special_tokens=True))bitsandbytes is installed correctly.model = AutoModelForCausalLM.from_pretrained(model_name_or_id, load_in_8bit=True, torch_dtype=torch.bfloat16, device_map="auto")low_cpu_mem_usage=True in model loading would help.eos_token and bos_token to our own, you may see unncessary information being generated by the model.