AIL. - AI-Local Systems (GPT4All)

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIL. -  AI-Local Systems (GPT4All) >

AIL. - AI-Local Systems (GPT4All)

AIL.Set n_Batch

Previous Top Next


MiniRobotLanguage (MRL)

 

AIL.Set n_Batch

Adjusts the batch processing size of tokens in the GPT4All AI

 

clip0815

 

Intention

 

The AIL.Set n Batch command lets users modify the "n_batch" parameter that determines the number of prompt tokens processed in parallel by the GPT4All AI model.

The parameter P1 is an integer representing the size of the batch to be processed concurrently:

 

Larger P1 values result in more tokens being processed simultaneously, which can decrease latency and increase speed. However, this comes at the cost of increased resource requirements, which can lead to potential performance issues if the system resources are limited.

 

Smaller P1 values result in fewer tokens being processed at once, which can be more resource-efficient but may increase processing time.

The optimal "n_batch" value depends on the specifics of your system's hardware and the size of the data being processed.

 

USAGE EXAMPLES

 

' Set "n_batch" to a larger value for faster processing:

' This command increases the number of tokens processed concurrently, potentially decreasing latency but increasing the demand on system resources.
AIL.Set n Batch|200

 

' Set "n_batch" to a smaller value for more efficient resource use:

' This command decreases the number of tokens processed at once, potentially increasing processing time but reducing the strain on system resources.
AIL.Set n Batch|50

 

The n_batch parameter controls the number of prompt tokens that are processed in parallel. A higher value of the n_batch parameter will result in lower latency, but it will also increase the resource requirements.

 

The default value of the n_batch parameter is 128. This means that 128 prompt tokens are processed in parallel. However, you can adjust the value of the n_batch parameter to achieve the desired balance between latency and resource requirements.

 

For example, if you want to generate text as quickly as possible, you can set the value of the n_batch parameter to a higher value, such as 256 or 512. This will ensure that the model is able to process the prompt tokens as quickly as possible.

 

On the other hand, if you are concerned about resource requirements, you can set the value of the n_batch parameter to a lower value, such as 64 or 32. This will ensure that the model does not use too much memory or CPU resources.

 

The "n_batch" parameter is an important factor in managing the trade-off between processing speed and resource efficiency.

Carefully consider your system's resources and the data size when determining an optimal "n_batch" value.

 

CAUTIONS

Setting the "n_batch" value requires careful consideration. High values might increase processing speed but could overburden your system's resources, leading to performance issues. Conversely, low values might be more resource-efficient but increase processing time. Always consider the specifics of your system's hardware and the size of the data when setting the "n_batch" value.

 

The best way to determine the optimal value of the n_batch parameter for your needs is to experiment with different values and see what works best for you.

 

Here are some additional things to keep in mind about the n_batch parameter:

 

The n_batch parameter does not affect the quality of the generated text. The model will still try to generate the best possible text, even if it is processed in parallel.

The n_batch parameter can be used to control the latency of the model. The model will be faster if it is processed in parallel, as it will not have to wait for each token to be processed individually.

The n_batch parameter can be used to control the memory usage of the model. The model will use more memory if it is processed in parallel, as it will have to store more tokens in memory.

The range of the n_batch parameter in GPT-4All is from 1 to 1024. A value of 1 means that only one prompt token will be processed in parallel, while a value of 1024 means that all of the prompt tokens will be processed in parallel.

 

 

 

 

Syntax

 

 

AIL.Set n_Batch[|P1]

AIL.snb[|P1]

 

 

Parameter Explanation

 

P1 - (optional) This is an integer representing the desired batch size ("n_batch").
       The chosen value should balance your need for processing speed with your system's resource availability and capabilities.

 

 

 

 

 

Example

 

'***********************************

'

'***********************************

 

 

 

 

 

Remarks

 

  -

 

Limitations:

 

-

 

 

See also: