File size: 3,613 Bytes
d24f749
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
license: apache-2.0
language:
  - en
library_name: transformers
tags:
  - smollm2
  - onnx
  - transformers.js
  - text-generation
  - fine-tuned
  - sft
  - dpo
  - lora
  - resume
  - chatbot
base_model: "HuggingFaceTB/SmolLM2-360M-Instruct"
datasets:
  - "justinthelaw/Resume-Cover-Letter-SFT-Dataset"
pipeline_tag: text-generation
---

# justinthelaw/SmolLM2-360M-Instruct-Resume-Cover-Letter-SFT

A fine-tuned version of [HuggingFaceTB/SmolLM2-360M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct) trained with a two-stage pipeline (SFT + DPO) to answer questions about **Justin**'s professional background, skills, and experience.

## Model Description

This model is designed for browser-based inference using [transformers.js](https://huggingface.co/docs/transformers.js). It powers a personal website chatbot that can answer questions about Justin's resume, work experience, education, and skills.

### Training Pipeline

The model is trained using a **SFT (Supervised Fine-Tuning)** approach, where factual memorization is enforced via conversation-formatted QA pairs.

### Training Details

- **Base Model**: [HuggingFaceTB/SmolLM2-360M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct)
- **Training Dataset**: [justinthelaw/Resume-Cover-Letter-SFT-Dataset](https://huggingface.co/datasets/justinthelaw/Resume-Cover-Letter-SFT-Dataset)
- **LoRA Configuration**:
  - Rank (r): 128
  - Alpha: 256
  - Dropout: 0.05
  - Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj

#### SFT Training Configuration

- Epochs: 16
- Batch Size: 16
- Learning Rate: 2e-05

## Model Formats

This repository contains multiple model formats:

| Format      | Location   | Use Case                                                  |
| ----------- | ---------- | --------------------------------------------------------- |
| SafeTensors | `/` (root) | Python/PyTorch inference                                  |
| ONNX        | `/onnx/`   | Full precision and quantized weights for the ONNX Runtime |

## Usage

### Browser (transformers.js)

```javascript
import { pipeline } from "@huggingface/transformers";

const generator = await pipeline(
  "text-generation",
  "justinthelaw/SmolLM2-360M-Instruct-Resume-Cover-Letter-SFT",
  { dtype: "q8" } // Uses model_quantized.onnx
);

const output = await generator("What is Justin's background?", {
  max_new_tokens: 256,
  temperature: 0.7,
});
```

### Python (Transformers)

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("justinthelaw/SmolLM2-360M-Instruct-Resume-Cover-Letter-SFT")
tokenizer = AutoTokenizer.from_pretrained("justinthelaw/SmolLM2-360M-Instruct-Resume-Cover-Letter-SFT")

prompt = "What is Justin's background?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

## Intended Use

This model is intended for:

- Personal website chatbots
- Resume Q&A applications
- Demonstrating fine-tuning techniques for personalized AI assistants

## Limitations

- The model is specifically trained on Justin's resume and may not generalize to other topics
- Responses are based on training data and may not reflect real-time information
- Not suitable for general-purpose question answering

## Author

### Justin

- GitHub: [justinthelaw](https://github.com/justinthelaw)
- HuggingFace: [justinthelaw](https://huggingface.co/justinthelaw)

## License

This model is released under the Apache 2.0 license.