[System] You are a helpful assistant.

[User] What is the capital of France?

[Assistant] The capital of France is Paris.


[User] Explain gradient descent in one sentence.

[Assistant] Gradient descent iteratively adjusts model parameters in the direction that most reduces the loss function.


[System] You are a concise coding assistant.

[User] Write a Python function that returns the factorial of n.

[Assistant]
```python
def factorial(n):
    return 1 if n <= 1 else n * factorial(n - 1)
```


prompt: What is supervised fine-tuning?

response: Supervised fine-tuning (SFT) trains a pre-trained model on labelled examples of the desired behaviour, adjusting weights to minimise cross-entropy loss on the target responses.


prompt: What is LoRA?

response: LoRA (Low-Rank Adaptation) fine-tunes large models by injecting trainable low-rank matrices into frozen weight layers, dramatically reducing the number of trainable parameters.


The transformer architecture, introduced in 'Attention Is All You Need' (Vaswani et al., 2017), relies entirely on self-attention mechanisms and has become the foundation of modern large language models.


QLoRA combines quantization with LoRA: the base model is loaded in 4-bit precision (frozen), while only the small LoRA adapter weights are trained in full precision.