Views
No views yet
1base_model: unsloth/Llama-3.2-1B-Instruct # Base model for self-attention and layer normalization
2gate_mode: hidden # Use hidden state representations for MoE gate parameters
3dtype: bfloat16 # Output data type for the merged model
4
5experts:
6 - source_model: Trelis/Llama-3.2-1B-Instruct-MATH-3ep # Expert for math-related tasks
7 positive_prompts:
8 - "Solve the following math problem:"
9 - "Calculate the value of:"
10 - "What is the result of:"
11
12 - source_model: huihui-ai/Llama-3.2-1B-Instruct-abliterated # Expert for uncensored queries
13 positive_prompts:
14 - "Explain the following controversial topic:"
15 - "Discuss the implications of:"
16 - "Provide an uncensored analysis of:"
17
18 - source_model: passing2961/Ultron-Summarizer-1B # Expert for summarization tasks
19 positive_prompts:
20 - "Summarize the following text:"
21 - "Provide a concise summary of:"
22 - "Generate a brief overview of:"
23
24 - source_model: unsloth/Llama-3.2-1B-Instruct # Base model also acts as the chat expert
25 positive_prompts:
26 - "How can I assist you today?"
27 - "What would you like to discuss?"
28 - "Let's have a conversation about:"1!pip install -qU transformers bitsandbytes accelerate
2
3from transformers import AutoTokenizer
4import transformers
5import torch
6
7model = "Xiaojian9992024/DaRuukLLM-Refresh-4x1B-v1"
8
9tokenizer = AutoTokenizer.from_pretrained(model)
10pipeline = transformers.pipeline(
11 "text-generation",
12 model=model,
13 model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
14)
15
16messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
17prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
18outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
19print(outputs[0]["generated_text"])