DEV Community

Ruslan Zholseitov
Ruslan Zholseitov

Posted on

How I Met Your Mistral and Tried to Train It...

Spun up a VM on e2-standard-8 (8 vCPU, 32 GB RAM), Ubuntu 22.04, 100 GB SSD. Neighboring servers started feeling jealous. Made a deal with myself: always shut down the VM or that $300 credit will vanish into the void.

Hooked up the Hugging Face token, loaded mistralai/Mistral-7B-v0.1. First run — no explosions, no drama. The model came to life and started talking in the terminal. I felt like Gandalf.

Set up train_lora.py, configured transformers, peft, datasets. First, some test data, then real API samples. The goal? Teach Mistral to speak API documentation fluently — endpoints, request models, auth, and all those tedious HTTP codes.

Downloaded 2701 specifications from APIs.guru, filtered out the junk — 2127 made it to the Golden Archive. Generated mistral_dataset.json with the key fields: endpoint, auth, request/response.

train: 1701 entries

val: 213 entries

test: 213 entries

GCP went down three times.

Conclusion: No GPU, no party. Off to find one.

Top comments (0)