Model Card for Model ID

This model is a fine-tuned version of Meta’s LLaMA 3.2 1B-Instruct specialized for optimizing SCPI (Standard Commands for Programmable Instruments) command sequences. It takes raw SCPI sequences as input and outputs an optimized version of the sequence along with an explanation of the optimization.

Model Details

Base Model Architecture: LLaMA 3.2 1B Instruct Provider: Meta Language: English Framework: Transformers, PEFT (LoRA) Precision: 4-bit (BitsAndBytes NF4 quantization)

Adapter / Fine-Tuning Info Adapter type: LoRA (Low-Rank Adaptation) Training objective: Optimize SCPI command sequences and explain improvements. Dataset: Custom SCPI dataset (train.jsonl and test.jsonl) containing command pairs (raw → optimized) with explanations. Training setup: Mixed-precision (4-bit NF4 quantization) Optimizer: AdamW 8bit Framework: Transformers + PEFT Evaluation metrics: Loss, Perplexity, BLEU, ROUGE

Uses

Optimize and explain SCPI command sequences for Keysight-style instruments or other devices using SCPI protocol.

Bias, Risks, and Limitations

  • The model is trained only on SCPI command sequences from Keysight and English explanations. It cannot generalize to other domains or scripting languages.
  • It expects well-formed SCPI commands; malformed or incomplete commands may yield irrelevant or verbose responses.
  • Quantization (4-bit) can slightly reduce precision in floating-point computations, which may cause subtle output variations between runs.
  • The model may include redundant or unnecessary commands if the context deviates from typical instrument-control patterns.

Recommendations

Always review optimized SCPI sequences manually before execution.

How to Get Started with the Model

Use the code below to get started with the model.

Training Details

Training Data

  • Dataset Name: Custom SCPI Optimization Dataset
  • Format: JSONL
  • Structure: Each record contains an input SCPI command sequence, the optimized version, and a natural-language explanation.
  • Size: ~1,500 data samples
  • Split Ratio: 90 % training / 10 % testing

Evaluation

Metric Value
BLEU 94.68
ROUGE-1 0.9753
ROUGE-2 0.9734
ROUGE-L 0.9745
Test Loss 3.6224
Perplexity 37.43

Testing Data, Factors & Metrics

Testing Data

Held-out test split from the same SCPI dataset (test.jsonl), never seen during training.

Metrics

Metric Description
BLEU Measures token-level overlap between generated and reference optimized SCPI sequences.
ROUGE-1/2/L Measures recall-based similarity for unigrams, bigrams, and longest common subsequence.
Loss Cross-entropy loss over token predictions.
Perplexity (PPL) Exponential of loss; indicates overall model confidence and fluency.

Results

[More Information Needed]

Summary

The fine-tuned LLaMA-3.2-1B-Instruct model demonstrates excellent alignment between its generated SCPI command optimizations and reference human annotations. High BLEU (94.68) and ROUGE (≈0.97) scores indicate strong lexical and structural similarity to the ground-truth optimized command sequences.

Moderate loss (3.62) and perplexity (37.43) are expected for structured symbolic text (SCPI commands), where even small token deviations can inflate numeric metrics despite correct semantic meaning.

The model consistently: Inserts missing initialization commands like *RST. Re-orders dependent operations for valid execution order. Adds relevant scpi commands which are missing during generation. Removes redundant or conflicting SCPI calls. Provides short, accurate explanations of optimizations.

Model Examination [optional]

[More Information Needed]

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: [More Information Needed]
  • Hours used: [More Information Needed]
  • Cloud Provider: [More Information Needed]
  • Compute Region: [More Information Needed]
  • Carbon Emitted: [More Information Needed]

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

[More Information Needed]

Software

[More Information Needed]

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]

Downloads last month
4
Safetensors
Model size
1B params
Tensor type
F32
·
F16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for rachelteoh1/scpi-llama-3.2-1b-instruct

Quantized
(421)
this model
Quantizations
1 model

Paper for rachelteoh1/scpi-llama-3.2-1b-instruct