Dataset Viewer
Auto-converted to Parquet Duplicate
instruction
stringlengths
17
2.84k
output
stringlengths
2
58k
A triangle has vertices at coordinates (2,2), (5,6) and (6,2). What is the number of units in the length of the longest side of the triangle?
To find the length of each side of the triangle and determine the longest side, we will use the distance formula. The distance formula for two points \((x_1, y_1)\) and \((x_2, y_2)\) is given by: \[ \text{Distance} = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \] Let's label the vertices as \(A(2,2)\), \(B(5,6)\), and \(C(...
What are some common scenarios for which custom views are used in Android development?
Custom views are used in Android development to create unique and reusable UI components that can't be achieved with the standard Android widgets. Here are some common scenarios where custom views are used: 1. **Complex layouts**: When you need to create a complex layout that involves multiple views, animations, or cu...
What's the meaning of the phrase "come hell or high water"?
The phrase "come hell or high water" is an idiomatic expression that means "no matter what happens" or "regardless of the circumstances." It is often used to convey determination, perseverance, or commitment to doing something, even in the face of adversity or obstacles. The phrase is thought to have originated in the...
Explain the key principles of Benny Lewis's "Speak from day 1" language learning approach. How does it differ from traditional language learning methods?
<thinking> To address this task, I need to: 1. Analyze the main ideas presented in the "Speak from day 1" approach 2. Compare these principles to traditional language learning methods 3. Highlight the unique aspects of Benny Lewis's approach 4. Consider the potential benefits and challenges of this method I'll structu...
Given that $m \angle A = 90^\circ$, $BC = 12$ units, $\overline{BD} \perp \overline{AC}$, $\overline{CE} \perp \overline{AB}$, and $m \angle DBC = 2m \angle ECB$. Find the length of segment $EC$.
<thought> Given that \(\angle A\) is \(90^\circ\), \(\triangle ABC\) is a right triangle with \(BC\) as the hypotenuse. The presence of segments \(\overline{BD} \perp \overline{AC}\) and \(\overline{CE} \perp \overline{AB}\) indicates that \(\overline{BD}\) and \(\overline{CE}\) are altitudes of the right triangle. Thi...
Explain the concept of exploratory data analysis, including its purpose and some key techniques used. How does it differ from other types of data analysis?
<thinking> To explain exploratory data analysis (EDA), I need to cover: - Definition and purpose of EDA - Key techniques used in EDA - Comparison with other types of data analysis I'll structure the response as follows: 1. Introduction and definition 2. Purpose and benefits of EDA 3. Key techniques and tools 4. Compar...
Explain the concept of a convex hull in computational geometry and provide a high-level overview of how to compute it using a sweep line algorithm.
<thinking> To explain the concept of a convex hull and its computation using a sweep line algorithm, I need to break this down into several key components: 1. Definition of convex hull 2. Visualization of the concept 3. Basic principles of the sweep line algorithm 4. Application of sweep line to convex hull computatio...
Can you elaborate on what you mean when you say 'make it a character in its own right'? What does this entail exactly?
When I say "make the setting a character in its own right," I mean giving the physical environment its own distinct personality, backstory, and even motivations that interact with the characters and influence the plot. This approach treats the setting as a dynamic entity that shapes the story, rather than just being a ...
Ralf is drawing a set of orthogonal axes on the complex plane, where a complex number can be represented as \(a+bi\) where \(a\) and \(b\) are real numbers and \(i\) represents the imaginary unit with \(i^2=-1\). If the Euclidean distance between the origin and a specific complex number \(-6+6i\) is \(LCM(6, p)\) and t...
<thought> To solve the problem, let's first understand that we need to find the Euclidean distance between the complex number \(-6+6i\) and the origin on the complex plane. The Euclidean distance in the complex plane is determined by the formula \(\sqrt{a^2 + b^2}\) for a complex number \(a + bi\). In our case, the co...
4. Let $A=$ the set of red balls, $B=$ the set of yellow balls, $C=$ the set of green balls, where $A, B, C$ are pairwise disjoint. We have: $\operatorname{card} A+\operatorname{cardB}=17, \operatorname{cardB}+\operatorname{card} C=29$ (2p) Subtract the first relation from the second and obtain cardC - cardA $=12$. ....
4. (7p) In a box, there are red, yellow, and green balls. Only 17 of them are not green and only 29 are not red. The red ones are half as many as the green ones. Determine the number of balls of each color. Liviu Cocariu-Ardelean Note: All questions are mandatory. Actual working time: 2 hours.
Can you solve this brain teaser for me? Here it is: Three people check into a hotel room. The clerk says the bill is $30, so each guest pays $10. Later the clerk realizes the bill should only be $25. To rectify this, he gives the bellhop $5 to return to the guests. On the way to the room, the bellhop realizes that he ...
<thinking> This is an interesting logic puzzle that requires careful analysis. Let's break down the key components: - Initial bill: $30 - Actual bill: $25 - Amount returned: $5 - Amount given back to guests: $3 - Amount kept by bellhop: $2 The puzzle seems to create confusion by mixing the actual amounts paid and rece...
Explain how to make a minor pentatonic scale in all 12 keys
The minor pentatonic scale is a 5-note scale that is commonly used in music, particularly in blues, rock, and folk. To make a minor pentatonic scale in all 12 keys, you can follow these steps: **Formula:** The formula for the minor pentatonic scale is: 1, 3, 4, 5, 7 **How to apply the formula:** 1. Start with the ro...
10. (20 points) Given $$ \lim _{x \rightarrow 0} f(x)=f(0)=1, f(2 x)-f(x)=x^{2} $$ for any real number $x$. Find the analytical expression of $f(x)$.
10. When $x \neq 0$, $$ f\left(\frac{x}{2^{k-1}}\right)-f\left(\frac{x}{2^{k}}\right)=\frac{x^{2}}{2^{2 k}}(k=1,2, \cdots, n) \text {. } $$ Adding these $n$ equations, we get $$ f(x)-f\left(\frac{x}{2^{n}}\right)=x^{2} \cdot \frac{\frac{1}{4}\left[1-\left(\frac{1}{4}\right)^{n}\right]}{1-\frac{1}{4}} \text {. } $$ Le...
Compare and contrast Communicative Language Teaching (CLT) with the Audio-Lingual Method. How do these approaches differ in their treatment of grammar instruction and error correction?
<thinking> To address this task, I need to: 1. Briefly define both Communicative Language Teaching (CLT) and the Audio-Lingual Method 2. Identify key characteristics of each approach 3. Compare their perspectives on grammar instruction 4. Compare their approaches to error correction 5. Draw conclusions about the fundam...
Write a technical article about the importance of code documentation in software development. Include best practices and common pitfalls to avoid.
<thinking> To approach this task, I'll need to: 1. Define code documentation and its importance 2. Outline best practices for effective documentation 3. Discuss common pitfalls developers should avoid 4. Provide examples to illustrate key points 5. Conclude with the long-term benefits of good documentation I'll struct...
Can I get more information about forming a study group?
Forming a study group can be a great way to collaborate with classmates, stay motivated, and improve your understanding of course material. Here's a step-by-step guide to help you form an effective study group: **Why Form a Study Group?** * Improved understanding: Discussing course material with peers can help clarif...
Noah's age is twice Joe's age and Sam's age is three times the sum of Noah's and Joe's present ages. If Joe is 6 years old, how old will Noah and Sam be in 10 years?
<thought> Let's focus on determining Noah's age based on the information provided. We know that Joe is currently 6 years old, and Noah's age is twice Joe's age. By setting up this relationship, we can calculate Noah's age accurately. - Given that Joe's age is 6 years, we express Noah's age as twice this value. ...
Describe the concept of Pareto efficiency in the context of general equilibrium theory. How does it relate to the First Fundamental Theorem of Welfare Economics?
<thinking> To address this prompt, I need to consider: - Definition of Pareto efficiency - Its role in general equilibrium theory - Explanation of the First Fundamental Theorem of Welfare Economics - The relationship between these concepts - Potential limitations or criticisms I'll start by defining Pareto efficiency,...
Explain the concept of vulnerability in the context of climate change adaptation. Include how it relates to sensitivity and adaptive capacity.
<thinking> To explain vulnerability in the context of climate change adaptation, I need to: 1. Define vulnerability 2. Explain its relationship to sensitivity and adaptive capacity 3. Provide examples to illustrate the concept 4. Discuss how this understanding is applied in climate change adaptation I should start wit...
Can you elaborate on what constitutes "large scale" under the GDPR?
Under the GDPR, "large scale" refers to the processing of personal data that meets certain criteria, which triggers specific obligations, such as the requirement to appoint a Data Protection Officer (DPO). However, the GDPR doesn't provide a clear numerical threshold for what constitutes "large scale." Instead, it prov...
Analyze the factors that led to the fall of the Roman Empire and discuss how they might be relevant to modern global superpowers.
<thinking> To address this complex historical question, I need to consider: - Key factors contributing to the Roman Empire's decline - The timeframe of the fall (gradual process vs sudden collapse) - Parallels between ancient Rome and modern superpowers - Potential lessons for contemporary global politics I'll approac...
G7.3 and G7.4 $\quad A, B$ are positive integers less than 10 such that $21 A 104 \times 11=2 B 8016 \times 9$. G7.3 Find $A$. G7.4 Find $B$.
11 and 9 are relatively prime, $21 A 104$ is divisible by 9 . $$ \begin{array}{l} 2+1+A+1+0+4=9 m \\ \Rightarrow 8+A=9 m \\ \Rightarrow A=1 \end{array} $$ $2 B 8016$ is divisible by 11 . $$ \begin{array}{l} 2+8+1-(B+0+6)=11 n \\ \Rightarrow 11-(B+6)=11 n \\ \Rightarrow B=5 \end{array} $$
B2. Jure wrote down the natural numbers from 1 to 2015 on a board. UrΕ‘ka then reviewed the written numbers from the smallest to the largest and erased every number that was not divisible by 3. Among the numbers that remained on the board, she then erased every number that was not divisible by $3^{2}$ from the smallest ...
B2. After UrΕ‘ka first reviewed all the recorded numbers, only numbers divisible by 3 remained on the board. When she went through the numbers a second time, only numbers divisible by $3^{2}$ remained. After the third review, only numbers divisible by $3^{3}$ remained, and so on. The largest power of 3 that is less than...
I have a short video clip of my pet cat peeking out from behind a curtain. Is there an animation/motion graphics sequence that can be added to this to make it look more interesting?
What a cute clip! Adding animation or motion graphics can definitely enhance the visual appeal and make it more engaging. Here are some ideas for animation/motion graphics sequences that you can add to your clip: 1. **Whimsical Text Overlay**: Add playful, cursive text that says "Sneaky Kitty" or "Furry Little Spy" to...
Explain the concept of mathematical optimization and provide an example of how it might be used in a real-world scenario. Include the key components of an optimization problem.
<thinking> To explain mathematical optimization, I need to: - Define the concept clearly - Outline the key components of an optimization problem - Provide a real-world example to illustrate its application - Consider potential complexities or limitations I'll structure the response to cover these points logically, sta...
What kind of chess opening do you recommend for a beginner?
As a beginner, it's essential to focus on understanding basic principles and developing your pieces quickly and harmoniously. Here are some recommendations for chess openings that are suitable for beginners: **For White:** 1. **The Italian Game**: This opening starts with 1.e4 e5 2.Nf3 Nc6 3.Bc4. It's a popular choic...
Explain the urea cycle and its role in amino acid metabolism. Describe the key enzymes involved, the cellular locations where it occurs, and how it's regulated. Also, discuss some disorders associated with urea cycle defects.
<thinking> To explain the urea cycle and its role in amino acid metabolism, I need to cover: - Overview of the urea cycle and its purpose - Step-by-step breakdown of the cycle - Key enzymes involved - Cellular locations of the reactions - Regulation mechanisms - Urea cycle disorders - Connection to other metabolic path...
8、Car A and Car B start from A and B respectively at the same time, heading towards each other, and meet after 4 hours. Car A then takes another 3 hours to reach B. If Car A travels 20 kilometers more per hour than Car B, the distance between A and B is ( ) kilometers.
【Analysis】Travel problem: meeting. Since the speed of car A - the speed of car B = 20 km/h, and they meet after 4 hours, the distance difference between the two cars when they meet is $20 \times 4=80$ km. If both cars have been driving for 3 hours, then car A has traveled 60 km more than car B. And if car B drives for ...
Determine all real numbers $ a$ such that the inequality $ |x^2 + 2ax + 3a|\le2$ has exactly one solution in $ x$.
To solve this problem, we need to analyze the inequality $|x^2 + 2ax + 3a| \leq 2$ and determine the values of $a$ such that it has exactly one solution for $x$. This inequality can be broken down into two separate cases due to the absolute value: 1. $x^2 + 2ax + 3a \leq 2$ 2. $-(x^2 + 2ax + 3a) \leq 2$ Simplifying ...
Can you give me 5 books on personal growth and development that you would recommend?
Here are five book recommendations on personal growth and development that I highly recommend: 1. **"The 7 Habits of Highly Effective People" by Stephen Covey**: This classic book provides a comprehensive approach to personal growth and development. Covey presents seven habits that highly effective people adopt to ach...
1. If the function $f(x)=\frac{a^{x}}{a^{x}+\sqrt{a}}$, then the value of $\sum_{i=1}^{100} f\left(\frac{i}{101}\right)$ is
1. 50 . $$ f(x)=\frac{a^{x}+\sqrt{a}-\sqrt{a}}{a^{x}+\sqrt{a}}=1-\frac{\sqrt{a}}{a^{x}+\sqrt{a}}=1-\frac{a}{\sqrt{a} \cdot a^{x}+a}=1-\frac{a^{1-x}}{\sqrt{a}+a^{1-x}}=1-f(1-x), $$ That is, $f(x)+f(1-x)=1$.
5.1. Among the numbers exceeding 2013, find the smallest even number $N$ for which the fraction $\frac{15 N-7}{22 N-5}$ is reducible.
Answer: 2144. Solution: The presence of a common factor in the numbers $15 N-7$ and $22 N-5$ implies that the same factor is present in the number $(22 N-5)-(15 N-7)=7 N+2$, and subsequently in the numbers $(15 N-7)-2 \cdot(7 N+2)=N-11,(7 N+2)-7 \cdot(N-11)=79$. Since 79 is a prime number, the fraction is reducible by ...
Explain the process of solving coding challenges on an online platform, and provide some tips for success.
<thinking> To explain the process of solving coding challenges on an online platform, I need to: 1. Break down the steps involved in tackling a coding challenge 2. Highlight key features of the platform 3. Provide practical tips for success I'll structure the explanation chronologically, from accessing the challenge t...
Given points $A(-3,2)$ and $B(1,-4)$, find the equation of the line perpendicular to the line through $A$ and $B$, which also passes through the point $C(2,1)$. Additionally, determine the distance from $C$ to $A$.
<thought> Okay, let's calculate the slope of the line that passes through points A and B using the slope formula. The coordinates for point A are \((-3, 2)\) and for point B are \((1, -4)\). By substituting these values into the slope formula \((y_2 - y_1) / (x_2 - x_1)\), we get: - **Numerator**: \(y_2 - y_1 = -4 - 2...
Find all pairs $ (x, y) $ for which the given expression is true: $ \sqrt{x} + \sqrt[4]{y} = 7 $ and $ \sqrt{x} \cdot \sqrt[4]{y} = 10. $
<thought> To make progress, let's express the given problem in terms of new variables, which will simplify the algebraic manipulation. By setting $a = \sqrt{x}$ and $b = \sqrt[4]{y}$, we transform the original equations into: 1. $a + b = 7$ 2. $a \cdot b = 10$ These equations now resemble the well-known relationships...
Frankie and Carla played 30 games of ping pong against each other. In the first half of the games, Frankie won one-fourth of the total games played. In the second half of the games, Frankie won two-thirds of the total games played. How many games did Carla win? Let's think step by step, and present the answer clearly i...
<thought> First, let's determine the number of games played in each half. Since there are 30 games in total, and they are divided into two halves, each half consists of: \[ \frac{30}{2} = 15 \text{ games} \] Now, we focus on the first half of the games. According to the problem, Frankie won one-fourth of the total ga...
Assume that $\alpha$ is inversely proportional to $\beta$. If $\alpha = x$ when $\beta = y$, find $\alpha$ when $\beta = z$ in terms of $x, y,$ and $z$.
<thought> Okay, to tackle this problem, let's focus on deciphering what it means for \(\alpha\) to be inversely proportional to \(\beta\). Inverse proportionality implies that as one variable increases, the other decreases such that their product remains constant. Mathematically, this relationship is expressed as \(\al...
What inspired me to write this poem?
I can try to help you explore what might have inspired you to write this poem! Based on the content and themes present in the poem, here are some possible inspirations: 1. **Love for the ocean**: The poem's focus on the sea and its beauty suggests that you might have a strong affection for the ocean and its power. Pe...
How do I plan my transportation to Niagara Falls if I'm not driving?
If you're not driving to Niagara Falls, don't worry! There are several transportation options available to get you to the falls from nearby cities like Buffalo, NY, and Toronto, ON. Here are some ways to plan your transportation to Niagara Falls: **From Buffalo, NY:** 1. **NFTA Metro Bus**: The NFTA Metro Bus system ...
Can you elaborate on the philosophical aspects of otherness?
A delightful dive into the depths of philosophical thought! The concept of otherness has been extensively explored in various philosophical traditions, and I'll outline some key ideas and thinkers associated with this concept. **Emmanuel Levinas: Ethics and Alterity** Levinas, a French philosopher, is perhaps the mos...
Explain the concept of deep homology in evolutionary developmental biology. Include its history, significance, and provide an example.
<thinking> To explain deep homology in evolutionary developmental biology, I need to cover several key points: 1. Definition of deep homology 2. Historical context and development of the concept 3. Significance in evolutionary biology 4. Examples to illustrate the concept I'll start with a clear definition, then provi...
Let \( T = \left( 1 - \frac{1}{2} \right) \left( 1 + \frac{1}{3} \right) \left( 1 - \frac{1}{4} \right) \cdots \left( (-1)^{n+1}\frac{1}{n} \right) \). Find \( T \) when \( n = 25 \).
<thought> Let's begin by analyzing the product expression to understand its structure. The expression \( T = \left( 1 - \frac{1}{2} \right) \left( 1 + \frac{1}{3} \right) \left( 1 - \frac{1}{4} \right) \cdots \left( (-1)^{n+1}\frac{1}{n} \right) \) can be broken down into individual components for clarity. 1. **Identi...
How can I bind sub README files for subfolders in GitHub repository?
In a GitHub repository, you can bind sub-README files for subfolders by creating a README file in each subfolder. Here are the steps: 1. **Create a README file in each subfolder**: In each subfolder, create a new file named `README.md` (or `README.txt`, but `.md` is the recommended format). This file will serve as the...
How does SDLC (Software Development Life Cycle) ensure a high-quality software product?
The Software Development Life Cycle (SDLC) is a framework that ensures a high-quality software product by providing a structured approach to software development. Here are some ways SDLC ensures a high-quality software product: 1. **Requirements Gathering and Analysis**: SDLC starts with a thorough requirements gather...
## Task B-3.5. Determine the number of real solutions to the equation $\sin x=\frac{x}{2017 \pi}$.
## Solution. To determine the number of solutions of the given equation, we will use the graphical representation of the functions $f(x) = \sin x$ and $g(x) = \frac{x}{2017 \pi}$. The number of solutions is equal to the number of points where the graphs of functions $f$ and $g$ intersect. ![](https://cdn.mathpix.com...
Given two functions $f(x) = \sin(3x)$ and $g(x) = \cos(2x)$, find the interval (x1, x2) in the interval [0, $\pi$] where the function $f(x)g(x) > 0$.
<thought> To solve the problem, let's analyze the product \( f(x)g(x) = \sin(3x) \cos(2x) \) and determine where it is positive within the interval \([0, \pi]\). For the product \( \sin(3x) \cos(2x) \) to be positive, both \(\sin(3x)\) and \(\cos(2x)\) must either be positive at the same time or negative at the same t...
Let $a,$ $b,$ $c,$ $d$ be real numbers such that \[a^2 + b^2 + c^2 + d^2 = 4.\]Find the maximum value of $a^3 + b^3 + c^3 + d^3.$
To find the maximum value of \(a^3 + b^3 + c^3 + d^3\) given the constraint \(a^2 + b^2 + c^2 + d^2 = 4\), we need to consider how the cube of real numbers behaves under the given constraint. First, note that the expression \(a^2 + b^2 + c^2 + d^2 = 4\) represents a sphere in 3-dimensional space with radius 2 centered...
End of preview. Expand in Data Studio

Persistence LoRA 10K Dataset

A diverse instruction-tuning dataset of 9,200 examples spanning mathematics, programming, language learning, general knowledge, geometry, and software development. Designed for supervised fine-tuning (SFT), LoRA training, and general instruction-following capability improvement.

πŸ“Š Dataset Overview

Property Value
Examples 9,200
Format Parquet (instruction + output)
Language English
License MIT
Task Instruction tuning, SFT, LoRA training
Size ~14.8 MB (compressed)

🎯 Use Cases

  • Supervised Fine-Tuning (SFT): Train models to follow diverse instructions
  • LoRA/QLoRA Training: Efficient parameter-efficient fine-tuning
  • Instruction Following Evaluation: Benchmark model capability across domains
  • Domain Adaptation: Add math, coding, reasoning capabilities to base models
  • Synthetic Data Generation: Seed for generating more instruction data

πŸ“‹ Data Structure

Each example contains two fields in the standard instruction-tuning format:

{
  "instruction": "A triangle has vertices at coordinates (2,2), (5,6) and (6,2). What is the number of units in the length of the longest side of the triangle?",
  "output": "To find the length of each side of the triangle and determine the longest side, we will use the distance formula..."
}
  • instruction (string): A task, question, or prompt requiring a detailed response
  • output (string): A comprehensive, step-by-step answer with explanations, formulas, code, or reasoning

🧠 Topic Coverage

The dataset spans multiple domains:

Category Example Topics Sample Count (est.)
Mathematics Geometry, algebra, coordinate geometry, distance formulas, triangle properties ~2,500
Programming/Software Android custom views, algorithms, data structures, API usage ~1,500
Language Learning Idioms, phrases, learning methodologies (e.g., Benny Lewis), etymology ~1,000
General Knowledge Explanations, definitions, how-to guides, conceptual questions ~2,000
Logic & Reasoning Multi-step problems, proofs, deductive reasoning ~1,200
Science/Technical Physics, chemistry, engineering concepts ~1,000

πŸ’‘ Example Instructions

Domain Example
Geometry "A triangle has vertices at coordinates (2,2), (5,6) and (6,2). What is the number of units in the length of the longest side?"
Android Dev "What are some common scenarios for which custom views are used in Android development?"
Idioms "What's the meaning of the phrase 'come hell or high water'?"
Language Learning "Explain the key principles of Benny Lewis's 'Speak from day 1' language learning approach. How does it differ from traditional methods?"
Advanced Geometry "Given that ∠A = 90Β°, BC = 12 units, BD βŸ‚ AC, CE βŸ‚ AB, and ∠DBC = 2∠ECB. Find the length of segment EC."

πŸš€ Quick Start

Load with Hugging Face datasets

from datasets import load_dataset

# Load the dataset
dataset = load_dataset("R0U5/persistence-lora-10k", split="train")

# Inspect
print(dataset[0])
# {'instruction': 'A triangle has vertices at coordinates (2,2)...', 
#  'output': 'To find the length of each side of the triangle...'}

# Format for SFT training
def format_sft(example):
    return {
        "text": f"### Instruction:\n{example['instruction']}\n\n### Response:\n{example['output']}"
    }

sft_dataset = dataset.map(format_sft)

Load with Pandas

import pandas as pd

df = pd.read_parquet("hf://datasets/R0U5/persistence-lora-10k/persistence-train-10k.parquet")
print(df.head())
print(f"Total examples: {len(df)}")

πŸ”§ Training Examples

SFT with TRL (Supervised Fine-Tuning)

from trl import SFTTrainer
from transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments
from datasets import load_dataset

model = AutoModelForCausalLM.from_pretrained("your-base-model")
tokenizer = AutoTokenizer.from_pretrained("your-base-model")
tokenizer.pad_token = tokenizer.eos_token

dataset = load_dataset("R0U5/persistence-lora-10k", split="train")

def formatting_func(example):
    return f"### Instruction:\n{example['instruction']}\n\n### Response:\n{example['output']}"

trainer = SFTTrainer(
    model=model,
    args=TrainingArguments(
        output_dir="./persistence-sft",
        per_device_train_batch_size=4,
        num_train_epochs=3,
        learning_rate=2e-5,
        logging_steps=10,
    ),
    train_dataset=dataset,
    formatting_func=formatting_func,
    tokenizer=tokenizer,
    max_seq_length=2048,
)

trainer.train()

LoRA/QLoRA with PEFT

from peft import LoraConfig, get_peft_model, TaskType
from transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments
from trl import SFTTrainer
from datasets import load_dataset

model = AutoModelForCausalLM.from_pretrained(
    "your-base-model",
    load_in_4bit=True,  # For QLoRA
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("your-base-model")
tokenizer.pad_token = tokenizer.eos_token

# LoRA config
peft_config = LoraConfig(
    task_type=TaskType.CAUSAL_LM,
    r=16,
    lora_alpha=32,
    lora_dropout=0.05,
    target_modules=["q_proj", "v_proj", "k_proj", "o_proj", "gate_proj", "up_proj", "down_proj"],
)

model = get_peft_model(model, peft_config)

dataset = load_dataset("R0U5/persistence-lora-10k", split="train")

def formatting_func(example):
    return f"### Instruction:\n{example['instruction']}\n\n### Response:\n{example['output']}"

trainer = SFTTrainer(
    model=model,
    args=TrainingArguments(
        output_dir="./persistence-lora",
        per_device_train_batch_size=4,
        gradient_accumulation_steps=4,
        num_train_epochs=3,
        learning_rate=2e-4,
        fp16=True,
        logging_steps=10,
    ),
    train_dataset=dataset,
    formatting_func=formatting_func,
    tokenizer=tokenizer,
    max_seq_length=2048,
)

trainer.train()
model.save_pretrained("./persistence-lora-adapter")

πŸ“ˆ Dataset Statistics

Examples: 9,200
Avg instruction length: ~180 chars
Avg output length: ~1,200 chars
Total tokens (est.): ~12M
Format: Natural language with LaTeX math, code blocks, structured reasoning

πŸ—οΈ Data Generation

This dataset was created through a curated synthetic generation pipeline:

  1. Topic seeding from educational resources, technical documentation, Q&A forums
  2. Instruction generation using diverse prompt templates across domains
  3. Response generation with high-quality models instructed to produce step-by-step reasoning
  4. Quality filtering for accuracy, completeness, formatting, and reasoning depth
  5. Deduplication and near-dedup removal
  6. Domain balancing to ensure diverse coverage

βš–οΈ License

MIT License β€” Free for commercial and research use.

MIT License

Copyright (c) 2024 R0U5

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ“š Citation

If you use this dataset in your research, please cite:

@misc{persistence_lora_10k,
  title={Persistence LoRA 10K: A Multi-Domain Instruction Tuning Dataset},
  author={R0U5},
  year={2024},
  publisher={Hugging Face},
  url={https://huggingface.co/datasets/R0U5/persistence-lora-10k},
  note={MIT License}
}

πŸ”— Related Resources

πŸ™‹ Support

  • Issues: GitHub Issues (or HF Discussions tab)
  • Questions: Open a Discussion on this dataset page

Dataset created as part of the Electric Sheep project β€” self-improving agentic systems research.

Downloads last month
14

Paper for R0U5/persistence-lora-10k