Skip to main content

⬇️ Installation

We can install xTuring globally on our machine, but it is advised to install it inside a virtual environment. Before starting, we have to make sure we have Python 3.0+ installed on our machine.

Install via pip

For this, we have to ensure that we have virtualenv package installed or anaconda setup on our machine.

Start by creating a virtual environment in our working directory:

$ virtualenv venv

Activate the virtual environment.

$ source venv/bin/activate

Once the virtual environment is activated, we can now install xTuring library by running the following command on your terminal:

$ pip install xTuring

This will install the latest version of xTuring available on pip. Finally, we can test if xTuring has been properly installed by running the following commands on our terminal:

$ python
>>> from xturing.models import BaseModel
>>> model = BaseModel.create('opt')
>>> outputs = model.generate(texts=['Hi How are you?'])

Then print the outputs variable to see what the LLM generated based on the input prompt.