pull/68/head^2
Kye 1 year ago
parent 924bf9bd7f
commit 62f80ff949

@ -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