mirror of
https://github.com/Hopiu/llm.git
synced 2026-04-15 10:41:01 +00:00
Link to article about generators
!stable-docs
This commit is contained in:
parent
e9a6998ca3
commit
df7d24835b
1 changed files with 2 additions and 2 deletions
|
|
@ -137,7 +137,7 @@ To execute the model, we start with a word. We look at the options for words tha
|
|||
|
||||
Some words might not have any following words from our training sentence. For our implementation we wil fall back on picking a random word from our collection.
|
||||
|
||||
We will implement this as a [Python generator], using the yield keyword to produce each token:
|
||||
We will implement this as a [Python generator](https://realpython.com/introduction-to-python-generators/), using the yield keyword to produce each token:
|
||||
```python
|
||||
def generate(transitions, length, start_word=None):
|
||||
all_words = list(transitions.keys())
|
||||
|
|
@ -578,4 +578,4 @@ You may find that you are unable to uninstall the plugin using `llm uninstall ll
|
|||
Should this happen, you can uninstall the plugin after first disabling it using the {ref}`LLM_LOAD_PLUGINS <llm-load-plugins>` environment variable like this:
|
||||
```bash
|
||||
LLM_LOAD_PLUGINS='' llm uninstall llm-markov
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue