chunk_id large_stringlengths 36 36 | doc_type large_stringclasses 2
values | category large_stringclasses 17
values | document large_stringclasses 50
values | version_raw large_stringclasses 590
values | chunk_index int64 0 262 | text large_stringlengths 11 5.69k | file_path large_stringclasses 882
values |
|---|---|---|---|---|---|---|---|
dbcf5676-e29b-5b50-a67a-33c4d7631433 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 12 | However, NVIDIA currently recommends testing that mode when `batch_size * num_heads` is less than the number of multi-processors on the GPU.
This guidance may be subject to change in the future.
Note that even if the multi-block mode is enabled, the attention operator will
not immediately trigger the multi-block versi... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
bc510e85-d8da-5bf6-99be-0d1bdc53ca2e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 13 | #### XQA Optimization[#](#xqa-optimization "Link to this heading")
XQA optimization is another optimization for MQA/GQA in the generation phase.
It currently only supports a limited number of model configurations, such as the LLAMA2 70B model.
Support matrix of the XQA optimization:
* FP16 / BF16 compute data type.
... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
e167eb0e-1bde-5b6a-b840-c04481e88c28 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 14 | ### In-flight Batching[#](#in-flight-batching "Link to this heading")
TensorRT LLM supports in-flight batching of requests (also known as continuous
batching or iteration-level batching) for higher serving throughput. With this feature,
sequences in the context phase can be processed together with sequences in
the gen... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
41851ca2-c642-57ee-b3cb-eae301e48c6c | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 15 | the length of the maximum input sequence is inefficient use of resources*.
### Chunked Context[#](#chunked-context "Link to this heading")
In the original state, the common behavior was to process all context tokens at
once. This feature splits the context into several chunks. In this way, the
context chunks can be b... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
12d8708d-2d60-5b46-a296-f8bfa8e44387 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 16 | that technique to accelerate its generation phase. In TensorRT LLM, there is
one KV cache per Transformer layer, which means that there are as many KV
caches as layers in a model. The current version of TensorRT LLM supports two
different types of KV caches: **contiguous** and **paged** KV caches.
#### Contiguous KV C... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
d5ec4b72-d15e-5482-bd2c-09368fafb21d | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 17 | keeps track of the sequences, allocates new blocks from a pool and recycles those
blocks when required. See the implementation of
[`KVCacheManager`](https://github.com/NVIDIA/TensorRT-LLM/tree/f42a6cb/tensorrt_llm/_torch/pyexecutor/resource_manager.py).
#### INT8/FP8 KV Caches[#](#int8-fp8-kv-caches "Link to this head... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
d63a7257-bf65-5240-994b-9869eb0cb2be | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 18 | since it does multiply as `fp_value * (1.0 / kv_cache_scaling_factor)` in plugin.
During generation, the values read from the cache are dequantized on-the-fly in
the MHA/MQA kernel. Dequantization is defined as
`quantized_value * kv_cache_scaling_factor`.
### Sliding Window Attention, Cyclic (Rolling Buffer) KV Cache... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
5e5009c8-8760-5b59-b6e2-1947b7efabe8 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 19 | dealing with very long sequences.
\_Note that the cyclic kv cache feature doesn’t work with beam searching currently as
the context kv cache are shared across beams.
### StreamingLLM[#](#streamingllm "Link to this heading")
The StreamingLLM feature uses a window attention to perform efficient and stable LLM
on long ... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
57e33880-8238-5db7-b660-7a5b21a955c3 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 20 | When determining the relative distance and adding positional information to tokens,
StreamingLLM use the positions within the cache rather than those in the original text.
`sink_token_length` is also used to enable this feature.
### Beam-Search[#](#beam-search "Link to this heading")
The attention operator supports ... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
7db34cc4-24b8-533b-baaf-9600a08400b9 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 21 | ### Input QKV tensor[#](#input-qkv-tensor "Link to this heading")
The input QKV tensor packs the Q, K and V tensors (concatenated along the last
dimension) after the projection of the hidden states. It is a 3D tensor. RoPE
and quantization to INT8 or FP8 (when needed) are performed by the GPT
attention operator.
In p... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
6fd987e2-2f31-5b5e-9926-a867bb6823a4 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 22 | for seq in generation_phase:
num_tokens += seq.beam_width
```
### Rotary Positional Embedding (RoPE)[#](#rotary-positional-embedding-rope "Link to this heading")
The attention operator can perform the computation of the Rotary
Positional Embedding (RoPE). When that operation is enabled,
`rotary_embedding_dim` is ... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
1a4c0e35-332e-5526-b27f-f8602927920b | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_attention | 130rc2 | 23 | ### Cross Attention[#](#cross-attention "Link to this heading")
On top of the MHA as self attention needed by GPT-style decoder-only models, the attention operator also supports cross attention.
This enables the attention operator to be more broadly used as a generic decoder component. For example, the Encoder-Decode... | large_dataset/raw/docs/nvidia_tensorrt-llm/attention/attention_130rc2.md |
bf589eaa-2471-5156-8477-2f6235127d50 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 100 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.0.0/features/lora.html
Version: 1.0.0
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fine-tuni... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_100.md |
c604842f-dbf7-5c5b-b7a0-cd5defb47a24 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 100 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_100.md |
44f3939b-93d9-5c1c-a820-8efe54b3c283 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 100 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_100.md |
89bbde14-c3d6-59eb-9ba7-57657c5f4c35 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 100 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_100.md |
3d2a0f50-55f5-50b5-9664-11c92aa6e5c2 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 100 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_100.md |
ffb97f94-bb30-5caa-bf76-debb97756c8f | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 100 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_100.md |
5414b8dd-3d90-5188-936c-231d6aef3acc | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 100 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_100.md |
ec4a2320-5ea8-5af3-a259-34c843d31e64 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.1.0/features/lora.html
Version: 1.1.0
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fine-tuni... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110.md |
9a80fcfe-9519-5fff-9ffc-ae246136f452 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110.md |
5750fc4d-68af-57c9-80fe-d75d05d6c429 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110.md |
d5640342-e1e7-5ec9-895d-1e0e8c0b631e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110.md |
9c83ebf8-e599-54c1-9dca-d2698adfedd9 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110.md |
c3684b69-a444-58d9-ba78-75926d9dc937 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110.md |
0cdd82d4-0410-586a-86de-c1bf88c89388 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110.md |
6ff04fc5-5bb2-5a34-b8e4-bbd81236a515 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc4 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.1.0rc4/features/lora.html
Version: 1.1.0rc4
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc4.md |
1c8d6824-d8f7-59c1-bcd8-849d432b0b7e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc4 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc4.md |
e67fc5b2-7eb1-53cd-a1e6-890f20353d24 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc4 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc4.md |
ef841a07-309b-5ce3-9bab-8a53bf7095e5 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc4 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc4.md |
e93bc160-9e56-5762-8c22-409ae9e44b98 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc4 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc4.md |
10953feb-51de-5748-ad2d-5ff8d77fb9ce | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc4 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc4.md |
c5317af7-a409-561f-9ad2-485eaaa8b95f | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc4 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc4.md |
a1a86909-c2db-5c94-9212-386214947f8d | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc5 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.1.0rc5/features/lora.html
Version: 1.1.0rc5
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc5.md |
2a55516e-1a67-5d83-91e1-1506929c431d | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc5 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc5.md |
40fe7b2e-d52f-5e25-be96-6b5b544739b3 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc5 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc5.md |
a9a3b710-7b66-5efc-82d7-31cb7497854e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc5 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc5.md |
55e135d9-5e55-511a-b15b-4ba794d3f38b | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc5 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc5.md |
f2df6397-32c1-58d4-9576-b41dc1b69abc | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc5 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc5.md |
f6681895-8db0-5888-ad45-ad176ff6b364 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 110rc5 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_110rc5.md |
5e63a776-b27d-5a6c-a98f-46f36be1ad30 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc0 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc0/features/lora.html
Version: 1.2.0rc0
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc0.md |
509b51aa-b488-5834-accd-2cb99be34207 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc0 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc0.md |
719243d8-7d00-5f02-b6d8-1c5a191dcaf8 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc0 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc0.md |
0d93dd2f-99c8-5030-a4af-f0caa5a4adcc | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc0 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc0.md |
5827fd68-c7a3-5840-8e93-eecb7ed0e775 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc0 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc0.md |
868df575-43cc-57a3-8a2f-3c08e3190a27 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc0 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc0.md |
9e2a68fa-d52d-516e-8e31-a38938fde88d | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc0 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc0.md |
6b185af4-a912-5fe8-8eb7-184d54f22349 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc1 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc1/features/lora.html
Version: 1.2.0rc1
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc1.md |
90608a73-624a-5f4c-8ec7-7af42437636d | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc1 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc1.md |
e4866285-16c8-5077-a57b-e129605f40b5 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc1 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc1.md |
79b9ce60-1e7b-5dc9-b969-464d322b608e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc1 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc1.md |
2fb0afc1-3729-5c94-a379-ea44b6977728 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc1 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc1.md |
1d3d36bb-a637-584b-bbd4-bd8d1f630417 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc1 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc1.md |
8af03b7e-1467-5932-a6c4-656d2443f27c | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc1 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc1.md |
76b3ac32-3f63-5934-b41b-a041cf27cbeb | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc2 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc2/features/lora.html
Version: 1.2.0rc2
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc2.md |
48ca71ed-8254-5b69-a22e-e002861bceed | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc2 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc2.md |
e42f42f5-b782-534a-999a-97635f6069db | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc2 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc2.md |
ede74fe8-108d-534e-8862-ed3040f1f340 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc2 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc2.md |
5ed7f10b-6d07-5737-bf86-61ce21686af8 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc2 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc2.md |
ff93f033-0567-51ae-ae68-f22ae4258a7a | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc2 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc2.md |
86ce1660-d217-547d-8cef-90936a40fffa | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc2 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc2.md |
09834f30-260c-53ec-a245-0901df3dc47b | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc3 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc3/features/lora.html
Version: 1.2.0rc3
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc3.md |
08927ec3-9181-5d56-a06e-50e8cb42c65d | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc3 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc3.md |
a23f9df1-3bf8-5276-adbb-b9e14fdc4692 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc3 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc3.md |
290faa9e-7b24-522f-bca8-83f73b605f18 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc3 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc3.md |
538e31c4-14e9-5e8e-b968-28225cb52d0d | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc3 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc3.md |
fa878f84-d472-5527-af07-565edeeba41e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc3 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc3.md |
491f44c1-704c-5449-a30f-89fff593eb95 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc3 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc3.md |
5d7b4c3d-b359-593f-9d69-667002cb01ec | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc4 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc4/features/lora.html
Version: 1.2.0rc4
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc4.md |
4f9d2f9f-ca64-57e3-8562-43468efe6f9f | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc4 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc4.md |
d9c7e24c-d9cd-5876-a719-b575afe8a987 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc4 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc4.md |
620bd778-bbc3-5ecf-8054-a4e4034b9e9e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc4 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc4.md |
cf39f775-8587-5bc6-ae91-66fa9bc20f29 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc4 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc4.md |
ec33c963-644c-5be4-b939-e1cf87b8c404 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc4 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc4.md |
b3b44477-e4e8-518f-9390-5849d949fb0c | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc4 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc4.md |
2018d0a6-b718-5c2e-835f-52f615218a1a | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc5 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc5/features/lora.html
Version: 1.2.0rc5
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc5.md |
1c8ab5e4-3c73-540f-be37-7d245a69a822 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc5 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc5.md |
6079281e-7a2d-5424-9497-ee67460552b8 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc5 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc5.md |
e7fbb4e0-9ddc-570f-aaf5-ee4a8955584c | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc5 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc5.md |
11a9a05e-c469-5af9-a23a-678333a6a6fe | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc5 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc5.md |
0cf66a1b-86ad-5bed-aaad-d86870a3b031 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc5 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc5.md |
59352c67-e2d3-55a9-8070-dfd89a22340e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc5 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc5.md |
5fbe6dd0-3803-5ccf-8c92-a5401a32ae0c | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc6 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc6/features/lora.html
Version: 1.2.0rc6
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc6.md |
899553f2-98fa-5116-9f98-5b08263b3830 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc6 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc6.md |
d797539c-d675-5aaa-a51d-f261c8b00a8e | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc6 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc6.md |
dfa1eb26-3a31-5eeb-b2ef-c6397640d437 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc6 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc6.md |
d8e54384-76c9-51ef-ae39-2a0b7530b303 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc6 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc6.md |
5e7c3b46-5052-5cd8-8225-b039c926abee | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc6 | 5 | ### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.completions.create(
model="/path/to/model",
prompt="What is the capital city of France?",
max_tokens=20,
extra_body={
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc6.md |
cf15b43d-0e0e-5e74-8873-0ea556ceffc6 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc6 | 6 | ### Run trtllm-bench[#](#run-trtllm-bench "Link to this heading")
```None
trtllm-bench --model $model_path throughput --dataset $dataset_path --extra_llm_api_options extra_llm_api_options.yaml --num_requests 64 --concurrency 16
```
| large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc6.md |
064b2afd-15fc-566a-b1cb-dc2069285ac6 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc7 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc7/features/lora.html
Version: 1.2.0rc7
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc7.md |
f8bf3714-9ab9-5fdc-95ed-3c7208e498e3 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc7 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc7.md |
c98c3a31-224c-5627-92a9-f210c9ca599b | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc7 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc7.md |
8a3b237a-a944-5af6-8e58-1f4024af6bb9 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc7 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc7.md |
43d2df97-d049-5eac-a29f-d8faeb2caf1f | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc7 | 4 | ### Cache Management[#](#cache-management "Link to this heading")
```None
from tensorrt_llm.llmapi.llm_args import PeftCacheConfig
# Fine-tune cache sizes
peft_cache_config = PeftCacheConfig(
host_cache_size=1024*1024*1024, # 1GB CPU cache
device_cache_percent=0.1 # 10% of free GPU memory
)
llm = L... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc7.md |
eb9d8ef2-b923-5263-a91b-85ec8c6364c3 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc7 | 5 | ### Starting the Server[#](#starting-the-server "Link to this heading")
```None
python -m tensorrt_llm.commands.serve
/path/to/model \
--config config.yaml
```
### Client Usage[#](#client-usage "Link to this heading")
```None
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc7.md |
12ca3b78-e460-50dd-9c5e-e2dbfb1f93db | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc7 | 6 | Existing workflows using `--extra_llm_api_options <file.yaml>` continue to work; it is an equivalent alias.
Create a `config.yaml` file:
```None
lora_config:
lora_dir:
- /workspaces/tensorrt_llm/loras/0
max_lora_rank: 64
max_loras: 8
max_cpu_loras: 8
lora_target_modules:
- attn_q
- attn_k
- ... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc7.md |
9ee98125-db48-5523-86d3-ccddceb482b3 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc8 | 0 | # LoRA (Low-Rank Adaptation)#
Source: https://nvidia.github.io/TensorRT-LLM/1.2.0rc8/features/lora.html
Version: 1.2.0rc8
LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that enables adapting large language models to specific tasks without modifying the original model weights. Instead of fin... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc8.md |
b9b4a6b3-e8cd-5d13-9bcf-00433eabfcd7 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc8 | 1 | * [Client Usage](#client-usage)
5. [TRTLLM bench with LORA](#trtllm-bench-with-lora)
* [YAML Configuration](#yaml-configuration)
* [Run trtllm-bench](#run-trtllm-bench)
## Background[#](#background "Link to this heading")
The PyTorch backend provides LoRA support, allowing you to:
* Load and apply multiple... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc8.md |
fc02b059-4a67-54df-b3c2-0e61f1e0577c | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc8 | 2 | model="/path/to/base/model",
lora_config=lora_config
)
# Create LoRA request
lora_request = LoRARequest("my-lora-task", 0, "/path/to/lora/adapter")
# Generate with LoRA
prompts = ["Hello, how are you?"]
sampling_params = SamplingParams(max_tokens=50)
outputs = llm.generate(
prompts,
sampling_params,
... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc8.md |
3efef3fc-19d8-5538-b956-9ac5cca3abf8 | docs | nvidia_tensorrt-llm | nvidia_tensorrt-llm_lora | 120rc8 | 3 | sampling_params,
lora_request=[lora_req1, lora_req2]
)
```
## Advanced Usage[#](#advanced-usage "Link to this heading")
### LoRA with Quantization[#](#lora-with-quantization "Link to this heading")
```None
from tensorrt_llm.models.modeling_utils import QuantConfig
from tensorrt_llm.quantization.mode import Q... | large_dataset/raw/docs/nvidia_tensorrt-llm/lora/lora_120rc8.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.