Former-commit-id: e519dc1d06ebaa435b38940ee89291f9333f0615
pull/160/head
Kye 2 years ago
parent 55d7aefdcb
commit a8268fa29d

@ -93,7 +93,7 @@ Here are three ways to use the `HuggingfaceLLM` class:
#### Example 1: Basic Usage #### Example 1: Basic Usage
```python ```python
from your_module import HuggingfaceLLM from swarms.models import HuggingfaceLLM
# Initialize the HuggingfaceLLM instance with a model ID # Initialize the HuggingfaceLLM instance with a model ID
model_id = "gpt2-small" model_id = "gpt2-small"
@ -108,7 +108,7 @@ print(generated_text)
#### Example 2: Custom Configuration #### Example 2: Custom Configuration
```python ```python
from your_module import HuggingfaceLLM from swarms.models import HuggingfaceLLM
# Initialize with custom configuration # Initialize with custom configuration
custom_config = { custom_config = {
@ -127,7 +127,7 @@ print(generated_text)
#### Example 3: Distributed Processing #### Example 3: Distributed Processing
```python ```python
from your_module import HuggingfaceLLM from swarms.models import HuggingfaceLLM
# Initialize for distributed processing # Initialize for distributed processing
inference = HuggingfaceLLM(model_id="gpt2-medium", distributed=True) inference = HuggingfaceLLM(model_id="gpt2-medium", distributed=True)

Loading…
Cancel
Save