• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
LLMs | Installation
  1. Install Python
  2. Install Hugging Face Command Line Interface (CLI)
  3. Install Hugging Face Transformers
  4. Test Hugging Face Transformers
  5. Install llama-cpp-python
  6. Test lama-cpp-python
  7. Install LangChain

  1. Install Python
    See this page for details on installing Python and the minimum libraries required for your development environment: Install Python

    Create and activate a virtual environment for your project directory::

    If at any time you want to deactivate the virtual environment in your project directory and clean it up, run the following commands:
  2. Install Hugging Face Command Line Interface (CLI)
    See this page for more details: https://huggingface.co/docs/huggingface_hub/main/en/guides/cli

    To install the Hugging Face CLI package:

    To test the installation of the Hugging Face CLI package:

    You can use the CLI to download models:
  3. Install Hugging Face Transformers
    See this page for more details: https://huggingface.co/docs/transformers/en/installation

    Install Transformers with pip in your newly created virtual environment:

    To install a CPU-only version of Transformers and a machine learning framework PyTorch, run the following command:
    To test if the installation was successful, run the following command. It should return a label and a score for the provided text:
  4. Test Hugging Face Transformers
    Example:

    Output:
  5. Install llama-cpp-python
    See these pages for more details:
    https://pypi.org/project/llama-cpp-python/
    https://python.langchain.com/docs/integrations/llms/llamacpp/

    To install the llama-cpp-python package:
  6. Test lama-cpp-python
    Download this model:

    Python code:

    Output:
  7. Install LangChain
    See this page for more details: https://python.langchain.com/docs/how_to/installation/

    To install the main LangChain package:

    To install the LangChain core package:

    To install the LangChain community package:

    To install the LangChain command Line Interface (CLI) package:

    To test the installation of the LangChain CLI package:
© 2025  mtitek