Rebiha

HomeDatasets › Advanced Coding

Advanced Coding Fine-Tuning Dataset

Frameworks, debugging, system design, architecture patterns

Fine-tune a model on this dataset

$19 for the dataset. Training is priced separately by model, starting at $47.

What is in this dataset

490 instruction-response pairs covering frameworks, debugging, system design, architecture patterns. Each pair is a realistic question with a full written answer, in the JSONL format used for supervised fine-tuning. No synthetic filler, no duplicated rows.

Example pairs

Real rows from the dataset, shown in full.

I’m getting a segmentation fault in my C++ program when I try to insert into a custom hash map. Here’s the code snippet: `void insert(int key, int value) { int idx = key % capacity; if (table[idx].occupied) { while (table[idx].occupied) { idx = (idx + 1) % capacity; } } table[idx] = {key, value, true}; }`. What’s wrong?

The segmentation fault likely occurs because your loop for handling collisions (open addressing with linear probing) never checks if the table is full, leading to an infinite loop when `capacity` is exceeded, causing a stack overflow or memory access violation. Additionally, you’re not checking if the key already exists, which could cause overwrites without proper handling. Here’s a corrected version with bounds checking and duplicate key handling: ```cpp void insert(int key, int value) { int idx = key % capacity; int start = idx; while (table[idx].occupied) { if (table[idx].key == key) { table[idx].value = value; // Update existing key return; …

Design a scalable system architecture for a real-time collaborative document editing service (like Google Docs) that supports thousands of concurrent users. Focus on consistency, conflict resolution, and low latency.

A scalable architecture for real-time collaborative editing requires handling concurrent edits with operational transformation (OT) or CRDTs (Conflict-Free Replicated Data Types). Here’s a recommended design: 1. **Client Layer**: WebSocket connections for real-time communication. Each client maintains a local copy of the document and sends operations (insert, delete) as deltas. 2. **Load Balancer**: Distribute WebSocket connections across a pool of application servers (e.g., using NGINX or HAProxy with sticky sessions). 3. **Application Servers (Stateless)**: Each server runs a collaboration service that receives operations, applies OT/CRDT logic, and broadcasts to other connected…

Explain the Strategy pattern with a concrete use case in a payment processing system. Provide a code example in Python.

The Strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable at runtime. In a payment processing system, you might have multiple payment methods (credit card, PayPal, cryptocurrency) with different validation and processing logic. **Use Case**: A checkout service that selects a payment strategy based on user choice. ```python from abc import ABC, abstractmethod class PaymentStrategy(ABC): @abstractmethod def pay(self, amount: float) -> bool: pass class CreditCardPayment(PaymentStrategy): def __init__(self, card_number: str, cvv: str): self.card_number = card_number self.cvv = cvv def pay(self,…

Who this is for

Developer assistants handling debugging, architecture, and design patterns.

Which models this works with

The dataset is plain JSONL, so it works with any instruction-tuned open model. On Rebiha you can train it directly on:

Training uses LoRA, or QLoRA on a 4-bit base for larger models. Your base model's weights are never modified — training produces a separate adapter.

How it works

  1. Pick this dataset and a base model.
  2. Rebiha runs the job on a managed GPU. You set up nothing.
  3. Download your model: a ready-to-run GGUF, plus developer assets (adapter, tokenizer, configs).

Fine-tuning or RAG?

Use RAG when the model needs facts that change — your prices, your documents, today's inventory. Use fine-tuning when you want consistent style and structure without prompting for it every time. This dataset teaches the shape of a good answer in this domain, not facts to look up.

Related datasets

Start fine-tuning