<aside> 👉 We are focused on building a right platform for automated coding data curation at scale, helping system engineers to train models faster, to better performance, and enabling smaller models to achieve programming tasks competitive with much larger models.
</aside>
While experimenting with the right coding model for system engineers, we found that existing models had difficulty understanding technical specifications. For instance, GPT models struggled to generate Bluetooth driver code when given a Bluetooth specification as input.
We experimented with various approaches, including Retrieval-Augmented Generation (RAG), in-context learning, and both large and small language models, to optimize responses for programming tasks like generating device driver code from datasheets in PDF format.
Eventually, we began training a language model using the PDFs and sample code. Through this process, we discovered that when we created a properly instruction-tuned dataset from the PDFs and code for the model, the results were significantly improved.
This led us to explore the best methods for converting unstructured technical specifications and code into a training dataset for the language model.
H2LooP simplifies code comprehension, debugging, and generation for system engineers by using fine-tuned coding models. It converts unstructured technical specifications, datasets, and sample code into instruction-tuned datasets, enabling more accurate and context-aware model responses. This helps engineers efficiently handle tasks like generating device driver code, interpreting hardware schematics, and analysing crash logs.
<aside> 👉
Human in LooP:
Models are what they eat.We create high-quality, pre-vetted coding training data at scale for fine-tuning small language models.
We leverage both LLMs and human expertise(system knowledge) to build this dataset, ensuring better data, a superior model, and ultimately a stronger business.
</aside>
The Studio product demonstrates how the quality of the model's responses improves significantly when fine-tuned with an instruction-based dataset generated from technical specifications and code.
You can compare the H2LooP model output with GPT-4o.
Step -1
Login to https://studio.h2loop.ai/ with your google or company ID
<aside> 👉 We provide free credits to do experiment with the sample data sheets.
</aside>
Download any sample data sheet. For ease of testing , we have provided some sample accelerometer
datasheets. We provide credits
Step 2:
Upload the data sheet and choose the GPT-4o-Mini model to compare its output with the H2LooP model.
Step 3:Start asking some specific questions related to lower level programming tasks and compare the results between H2LooP and GPT 4o Mini.
We plan to add new workflows to the H2LooP Studio product in the future, including code comprehension, debugging crash logs, and reading hardware schematics.
In Parallel, we are building a platform to generate and manage high-quality training datasets for programming tasks.We understand that getting the right response from the coding model, needs an extensive, diverse, and superior-quality dataset.
H2LooP takes technical specifications, datasets, and sample reference code as inputs to generate an instruction-tuned dataset.
This a sample instruction tuned dataset generated from a technical datasheet /specification and reference code.
{
"messages": [
[
{
"role": "user",
"content": "The FXLS8962AF accelerometer provides a flexible full-scale range, allowing designers to adjust the sensor's sensitivity to optimize its performance for specific applications. The available full-scale measurement ranges for the FXLS8962AF are \\u00b12g, \\u00b14g, \\u00b18g, and \\u00b116g, which can be selected via the SENS_CONFIG1 register, specifically using the FSR[1:0] bit field. By configuring these ranges, it is possible to manage different accelerations with varying levels of precision, adhering to the respective nominal sensitivities specified as 0.98 mg/LSB for \\u00b12g, 1.95 mg/LSB for \\u00b14g, 3.91 mg/LSB for \\u00b18g, and 7.81 mg/LSB for \\u00b116g. This adaptability makes the FXLS8962AF suitable for a broad range of dynamic situations, from gentle movements to more intense dynamic inputs."
},
{
"role": "assistant",
"content": "static const int fxls8962af_scale_table[FXLS8962AF_SCALE_TABLE_LEN][2] = {\\n\\t{0, IIO_G_TO_M_S_2(980000)},\\n\\t{0, IIO_G_TO_M_S_2(1950000)},\\n\\t{0, IIO_G_TO_M_S_2(3910000)},\\n\\t{0, IIO_G_TO_M_S_2(7810000)},\\n};"
},
{
"role": "system",
"content": "The code defines a constant integer 2D array named `fxls8962af_scale_table` with a length of `FXLS8962AF_SCALE_TABLE_LEN`. This array contains four pairs of values, where the first value in each pair is 0 and the second value is the result of calling the `IIO_G_TO_M_S_2` function with specific parameters. These parameters represent the nominal sensitivities of the FXLS8962AF accelerometer for different full-scale measurement ranges (\\u00b12g, \\u00b14g, \\u00b18g, and \\u00b116g), expressed in micro-g units. The `IIO_G_TO_M_S_2` function likely converts these values from gravity to meters per second squared."
},
{
"role": "user",
"content": "The FXLS8962AF accelerometer offers a variety of user-configurable options which include selectable Output Data Rates (ODRs) spanning from 0.781 Hz to 3200 Hz. This flexibility allows the device to accommodate different application requirements in terms of resolution, power consumption, and performance. In high performance (HPM) and low power (LPM) modes, the ODR can be chosen as per the predefined settings, ensuring that applications can adjust to the necessary data capture speed. The internal register settings, specifically the WAKE_ODR and SLEEP_ODR fields in the SENS_CONFIG3 register, control the ODR values in the high-performance and low-power modes. Additionally, in Flexible Performance Mode (FPM), the Output Data Rate is determined using the decimation factor (set via the WAKE_DEC and SLEEP_DEC fields) and the respective idle times, allowing for custom ODR settings that optimize power and performance trade-offs. The use of a sampling frequency table facilitates the conversion of required ODR values into device-compatible settings, making it straightforward for systems to dynamically adapt their data acquisition rates based on real-time application demands."
},
{
"role": "assistant",
"content": "static const int fxls8962af_samp_freq_table[FXLS8962AF_SAMP_FREQ_TABLE_LEN][2] = {\\n\\t{3200, 0}, {1600, 0}, {800, 0}, {400, 0}, {200, 0}, {100, 0},\\n\\t{50, 0}, {25, 0}, {12, 500000}, {6, 250000}, {3, 125000},\\n\\t{1, 563000}, {0, 781000},\\n};"
},
{
"role": "system",
"content": "The code defines a static constant integer array named 'fxls8962af_samp_freq_table' with a length of 'FXLS8962AF_SAMP_FREQ_TABLE_LEN'. This array represents a sampling frequency table for the FXLS8962AF accelerometer. Each pair in the array represents a possible Output Data Rate (ODR) for the accelerometer, with the first value in the pair representing the frequency in Hertz and the second value representing additional frequency in microHertz. This table allows for easy conversion of required ODR values into device-compatible settings, enabling systems to adapt their data acquisition rates based on real-time application demands."
},
{
"role": "user",
"content": "The FXLS8962AF is a feature-rich, 3-axis low-g accelerometer that can be used in a variety of applications across different domains, including automotive, industrial IoT, medical, and consumer devices. The sensor combines ultra-low-power consumption with a high level of performance and flexibility, making it suitable for applications requiring wake-up on motion detection. It supports multiple user-selectable full-scale ranges, including \\u00b12/4/8/16 g, and offers 12-bit acceleration data resolution. Additionally, the device integrates advanced digital features like sensor data change detection, autonomous orientation detection, and an output data buffer that can store up to 32 12-bit X/Y/Z data triplets. The sensor communicates via I2C or SPI interfaces, ensuring compatibility with a wide array of host systems. The functionality and configuration of the device are controlled through various registers, providing developers with fine-grained control over its operation modes, data acquisition settings, and interrupt output configurations. The compact size and high integration level of the FXLS8962AF make it an ideal choice for motion sensing applications in the IoT space."
},
{
"role": "assistant",
"content": "struct fxls8962af_chip_info {\\n\\tconst char *name;\\n\\tconst struct iio_chan_spec *channels;\\n\\tint num_channels;\\n\\tu8 chip_id;\\n};"
},
{
"role": "system",
"content": "The code defines a structure in C for the FXLS8962AF accelerometer chip. The structure, named 'fxls8962af_chip_info', contains four fields: a string for the name of the chip, a pointer to an array of IIO (Industrial I/O) channel specifications, an integer to hold the number of channels, and an 8-bit unsigned integer for the chip's ID. This structure is likely used to store and manage important information about the accelerometer chip in the software that interacts with it."
},
{
"role": "user",
"content": "The FXLS8962AF is a low-g 3-axis accelerometer, designed for various automotive, industrial, and medical IoT applications. It offers ultra-low-power wake-up on motion capabilities, making it ideal for use cases that demand minimal power consumption. The accelerometer supports high-performance and low-power operating modes, providing flexibility to balance resolution and power needs. It includes advanced digital features like Sensor Data Change Detection (SDCD), which allows it to detect motion, free fall, and other inertial events. FXLS8962AF ensures efficient data collection and reduced system power consumption by incorporating a FIFO/LIFO output data buffer and programmable interrupt outputs. The accelerometer communicates through I2C or SPI interfaces, with configurable registers for setting measurement ranges, output data rates (ODRs), and threshold values for different detection functions."
},
{
"role": "assistant",
"content": "struct fxls8962af_data {\\n\\tstruct regmap *regmap;\\n\\tconst struct fxls8962af_chip_info *chip_info;\\n\\tstruct {\\n\\t\\t__le16 channels[3];\\n\\t\\ts64 ts __aligned(8);\\n\\t} scan;\\n\\tint64_t timestamp, old_timestamp;\\t/* Only used in hw fifo mode. */\\n\\tstruct iio_mount_matrix orientation;\\n\\tint irq;\\n\\tu8 watermark;\\n\\tu8 enable_event;\\n\\tu16 lower_thres;\\n\\tu16 upper_thres;\\n};"
},
{
"role": "system",
"content": "The given code defines a structure for the FXLS8962AF accelerometer data. The structure includes a register map, chip information, scan data for the three channels, timestamps, orientation, interrupt request (irq), watermark, event enable flag, and upper and lower threshold values. This structure is used to store and manage the sensor's data and configuration settings."
},
{
"role": "user",
"content": "The regmap configuration for the FXLS8962AF I2C interface is designed to handle register settings effectively, where the register and value bits are both 8-bit long, ensuring compatibility with the default memory structure of the accelerometer. The configuration is specified to manage up to the maximum register address defined by the FXLS8962AF_MAX_REG constant, accommodating the comprehensive internal register map of the device. This setup allows for efficient interaction with all the relevant configuration and data registers needed for the device\\u2019s operation."
},
{
"role": "assistant",
"content": "const struct regmap_config fxls8962af_i2c_regmap_conf = {\\n\\t.reg_bits = 8,\\n\\t.val_bits = 8,\\n\\t.max_register = FXLS8962AF_MAX_REG,\\n};"
},
{
"role": "system",
"content": "The code defines a configuration for the FXLS8962AF I2C interface's regmap. It specifies that both the register and value bits are 8-bit long, and sets the maximum register address to the value of the constant FXLS8962AF_MAX_REG. This configuration allows efficient management and interaction with the device's internal register map."
},
{
"role": "user",
"content": "The configuration of the `fxls8962af_spi_regmap_conf` structure aligns with the control register layout and interface specifications detailed in the FXLS8962AF product data sheet. The structure is configured to describe the register map interface for communication over SPI. The key fields such as `reg_bits`, `pad_bits`, and `val_bits` are configured to match the 8-bit register address and data format of the FXLS8962AF accelerometer as specified in the register map section and the SPI interface details. Additionally, `max_register` represents the highest register address, ensuring that all addressable registers can be accessed through this configuration. This setup allows for efficient data transfer and register management facilitating interaction with the FXLS8962AF sensor."
},