Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Update TensorRTLLM.md

arnavsinghvi11950bcb43a89d
diff --git a/docs/api/local_language_model_clients/TensorRTLLM.md b/docs/api/local_language_model_clients/TensorRTLLM.md
index 2d9a7c5b8..946203d7b 100644
--- a/docs/api/local_language_model_clients/TensorRTLLM.md
+++ b/docs/api/local_language_model_clients/TensorRTLLM.md
@@ -1,12 +1,12 @@
# dspy.TensorRTModel
-TensorRT LLM by Nvidia happens to be one of the most optimized inference engine to run open source Large Language Models locally or in production.
+TensorRT LLM by Nvidia happens to be one of the most optimized inference engines to run open-source Large Language Models locally or in production.
### Prerequisites
-Install TensorRT LLM by the following instruction [here](https://nvidia.github.io/TensorRT-LLM/installation/linux.html). You need to install dspy inside the same docker environment in which tensorrt is installed.
+Install TensorRT LLM by the following instructions [here](https://nvidia.github.io/TensorRT-LLM/installation/linux.html). You need to install `dspy` inside the same Docker environment in which `tensorrt` is installed.
-In order to use this module, you should have model weights file in engine format. To understand how we convert weights in torch (from huggingface models) to tensorrt engine format, you can check out [this documentation](https://github.com/NVIDIA/TensorRT-LLM/tree/main/examples/llama#build-tensorrt-engines).
+In order to use this module, you should have the model weights file in engine format. To understand how we convert weights in torch (from HuggingFace models) to TensorRT engine format, you can check out [this documentation](https://github.com/NVIDIA/TensorRT-LLM/tree/main/examples/llama#build-tensorrt-engines).
### Running TensorRT model inside dspy
@@ -36,7 +36,7 @@ If `use_py_session` is set to `False`, the following kwargs are supported (This
- **sink_token_length** (`int`, optional): The sink token length. Defaults to `1`.
-> Please note that, you have done the build processes properly before applying these customization. Because lot of customization depends on how the model engine was built. You can learn more about [here](https://github.com/NVIDIA/TensorRT-LLM/tree/main/examples/llama#build-tensorrt-engines).
+> Please note that you need to complete the build processes properly before applying these customizations, because a lot of customization depends on how the model engine was built. You can learn more [here](https://github.com/NVIDIA/TensorRT-LLM/tree/main/examples/llama#build-tensorrt-engines).
Now to run the model, we need to add the following code:
@@ -51,7 +51,7 @@ This gives this result:
["nobody is perfect, and we all have our own unique struggles and challenges. But what sets us apart is how we respond to those challenges. Do we let them define us, or do we use them as opportunities to grow and learn?\nI know that I have my own personal struggles, and I'm sure you do too. But I also know that we are capable of overcoming them, and becoming the best versions of ourselves. So let's embrace our imperfections, and use them to fuel our growth and success.\nRemember, nobody is perfect, but everybody has the potential to be amazing. So let's go out there and make it happen!"]
```
-You can also invoke chat mode, by just changing the prompt to chat format like this:
+You can also invoke chat mode by just changing the prompt to chat format like this:
```python
prompt = [{"role":"user", "content":"hello"}]