MarineSparkLM-4B: A Lightweight Language Model for Marine and Offshore Engineering Built by Parameter-Efficient Adaptation
Abstract
Marine and offshore engineering knowledge is scattered across preprints, open-access journals, encyclopedias and institutional documents, but remains small by pretraining standards.
We examine how far parameter-efficient adaptation can take a lightweight domain model on a workstation-class device.
Starting from OceanGPT-basic-4B-Instruct, we trained two LoRA adapters, each updating 33.0 million of 4.06 billion parameters (0.81%).
Training on one NVIDIA DGX Spark took 4 hours 40 minutes for the first adapter and 10 minutes for the second.
The first used next-token prediction on a 61.6-million-token corpus covering ten engineering themes.
Of 13,879 source documents, 7,069 remained after deduplication and a two-tier keyword filter to remove cross-domain lexical collisions.
Validation loss fell from 2.082 to 1.976 over 1,500 steps.
After the continuation adapter drifted off topic on a retrieval-grounded ballast-water prompt, we trained an instruction adapter on 2,295 question-answer pairs: 114 hand-written and 2,181 generated by the base model from corpus passages.
Loss was applied only to answer tokens.
On 20 held-out prompts, hand-scored for accuracy, topicality and specificity (maximum 120), the base model, continuation adapter, instruction adapter and instruction adapter with retrieval scored 42, 56, 84 and 81.
The retrieval score reflects a corrected index-leakage issue.
A paired test supports the instruction-tuning gain but finds no retrieval benefit on this set.
Accuracy remained low: 14/40 without retrieval and 16/40 with it.
A second evaluation used prompts from passages excluded from both instruction-data splits, addressing selection leakage in round one.
It confirmed the instruction-tuning gain (p=0.0001 and p=0.0002) and found that retrieval significantly helped the base model, but not the instruction adapter.