Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| MARS-v0.2.Q2_K.gguf | Q2_K | 2.96GB |
| MARS-v0.2.IQ3_XS.gguf | IQ3_XS | 3.28GB |
| MARS-v0.2.IQ3_S.gguf | IQ3_S | 3.43GB |
| MARS-v0.2.Q3_K_S.gguf | Q3_K_S | 3.41GB |
| MARS-v0.2.IQ3_M.gguf | IQ3_M | 3.52GB |
| MARS-v0.2.Q3_K.gguf | Q3_K | 3.74GB |
| MARS-v0.2.Q3_K_M.gguf | Q3_K_M | 3.74GB |
| MARS-v0.2.Q3_K_L.gguf | Q3_K_L | 4.03GB |
| MARS-v0.2.IQ4_XS.gguf | IQ4_XS | 4.18GB |
| MARS-v0.2.Q4_0.gguf | Q4_0 | 4.34GB |
| MARS-v0.2.IQ4_NL.gguf | IQ4_NL | 4.38GB |
| MARS-v0.2.Q4_K_S.gguf | Q4_K_S | 4.37GB |
| MARS-v0.2.Q4_K.gguf | Q4_K | 4.58GB |
| MARS-v0.2.Q4_K_M.gguf | Q4_K_M | 4.58GB |
| MARS-v0.2.Q4_1.gguf | Q4_1 | 4.78GB |
| MARS-v0.2.Q5_0.gguf | Q5_0 | 5.21GB |
| MARS-v0.2.Q5_K_S.gguf | Q5_K_S | 5.21GB |
| MARS-v0.2.Q5_K.gguf | Q5_K | 5.34GB |
| MARS-v0.2.Q5_K_M.gguf | Q5_K_M | 5.34GB |
| MARS-v0.2.Q5_1.gguf | Q5_1 | 5.65GB |
| MARS-v0.2.Q6_K.gguf | Q6_K | 6.14GB |
| MARS-v0.2.Q8_0.gguf | Q8_0 | 7.95GB |

generate() function. Let's see examples of both.1import transformers
2import torch
3
4model_id = "curiositytech/MARS-v0.2"
5
6pipeline = transformers.pipeline(
7 "text-generation",
8 model=model_id,
9 model_kwargs={"torch_dtype": torch.bfloat16},
10 device_map="auto",
11)
12
13messages = [
14 {"role": "system", "content": "Sen korsan gibi konuşan bir korsan chatbotsun!"},
15 {"role": "user", "content": "Sen kimsin?"},
16]
17
18terminators = [
19 pipeline.tokenizer.eos_token_id,
20 pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
21]
22
23outputs = pipeline(
24 messages,
25 max_new_tokens=256,
26 eos_token_id=terminators,
27 do_sample=True,
28 temperature=0.6,
29 top_p=0.9,
30)
31print(outputs[0]["generated_text"][-1])1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "curiositytech/MARS-v0.2"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11)
12
13messages = [
14 {"role": "system", "content": "Sen korsan gibi konuşan bir korsan chatbotsun!"},
15 {"role": "user", "content": "Sen kimsin?"},
16]
17
18input_ids = tokenizer.apply_chat_template(
19 messages,
20 add_generation_prompt=True,
21 return_tensors="pt"
22).to(model.device)
23
24terminators = [
25 tokenizer.eos_token_id,
26 tokenizer.convert_tokens_to_ids("<|eot_id|>")
27]
28
29outputs = model.generate(
30 input_ids,
31 max_new_tokens=256,
32 eos_token_id=terminators,
33 do_sample=True,
34 temperature=0.6,
35 top_p=0.9,
36)
37response = outputs[0][input_ids.shape[-1]:]
38print(tokenizer.decode(response, skip_special_tokens=True))