Views
No views yet

1SYSTEM You are a TinyUltra, helpful and lovely AI assistant.
2
3TEMPLATE <|system|> {{ .System }}</s> <|user|> {{ .Prompt }}</s> <|assistant|>
4
5PARAMETER stop <|system|>
6PARAMETER stop <|user|>
7PARAMETER stop <|assistant|>
8PARAMETER stop </s>1base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
2gate_mode: hidden
3dtype: float16
4experts:
5 - source_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
6 positive_prompts:
7 - "Help me debug this code."
8 - "Rewrite this function in Python."
9 - "Optimize this C# script."
10 - "Implement this feature using JavaScript."
11 - "Convert this HTML structure into a more efficient design."
12 - "Assist me with writing a program that"
13 - source_model: vihangd/DopeyTinyLlama-1.1B-v1
14 positive_prompts:
15 - "How do you"
16 - "Explain the concept of"
17 - "Give an overview of"
18 - "Compare and contrast between"
19 - "Provide information about"
20 - "Help me understand"
21 - "Summarize"
22 - "Make a recommendation on"
23 - "Answer this question"
24 - source_model: cognitivecomputations/TinyDolphin-2.8.1-1.1b
25 positive_prompts:
26 - "Write a program to solve this problem"
27 - "Modify this function to improve its performance"
28 - "Refactor this code to enhance readability"
29 - "Create a custom function for this specific use case"
30 - "Optimize this algorithm to reduce computational complexity"
31 - "Implement this feature by extending existing codebase"
32 - "Integrate this API call into the application"
33 - "Help me troubleshoot and fix this bug"
34 - "Review and test this code snippet before deployment"
35 - "Analyze this error log to identify potential issues"
36 - "Generate a set of unit tests for this module"
37 - "Evaluate different approaches to solving this problem"
38 - "Do a web search for"
39 - "Use the plugin to"
40 - source_model: Josephgflowers/Tinyllama-Cinder-1.3B-Reason-Test
41 positive_prompts:
42 - "add these numbers"
43 - "whats 2+2"
44 - "subtraction"
45 - "division"
46 - "multiplication"
47 - "addition"
48 - "I need help with a math problem"
49 - "Solve for x"
50 - "Add these two numbers together: 4 + 3 = 7"
51 - "Multiply 5 by 6: 5 * 6 = 30"
52 - "Divide 8 by 2: 8 / 2 = 4"
53 - "Find the remainder when 9 is divided by 3: 9 % 3 = 0"
54 - "Calculate the square root of 16: sqrt(16) = 4"
55 - "Simplify the expression (a+b)/(c-d): (a+b)/(c-d)"
56 - "Factor out the common factor of 2 from 4x + 6y: 2(2x + 3y)"
57 - "Solve for x in the equation 3x - 7 = 2x + 5: x = 12"
58 - "Graph the line y = 2x + 3"
59 - "Approximate pi to three decimal places: 3.142"
60 - "Find the derivative of f(x) = sin(x): f'(x) = cos(x)"
61 - "Integrate g(x) = x^2 over the interval [0, 1]: g(1) - g(0) = 1/3"
62 - "Calculate the determinant of the matrix A = [[2, 3], [4, 5]]: det(A) = 2*5 - 3*4 = -2"
63 - "Solve the system of equations Ax = b: x = [-5, 10]"
64 - "Calculate the sum of the first n natural numbers using the formula Sn = n*(n+1)/2: sum(n=1 to 5) = 15"1!pip install -qU transformers bitsandbytes accelerate
2
3from transformers import AutoTokenizer
4import transformers
5import torch
6
7model = "gmonsoon/TinyUltra-4x1.1B-Base-Alpha"
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"])| Metric | Value |
|---|---|
| Avg. | 37.94 |
| AI2 Reasoning Challenge (25-Shot) | 34.90 |
| HellaSwag (10-Shot) | 61.42 |
| MMLU (5-Shot) | 25.42 |
| TruthfulQA (0-shot) | 37.59 |
| Winogrande (5-shot) | 65.75 |
| GSM8k (5-shot) | 2.58 |