ModelScopeEndpoint
ModelScope (Home | GitHub) is built upon the notion of “Model-as-a-Service” (MaaS). It seeks to bring together most advanced machine learning models from the AI community, and streamlines the process of leveraging AI models in real-world applications. The core ModelScope library open-sourced in this repository provides the interfaces and implementations that allow developers to perform model inference, training and evaluation. This will help you get started with ModelScope completion models (LLMs) using LangChain.
Overview
Integration details
Provider | Class | Package | Local | Serializable | Package downloads | Package latest |
---|---|---|---|---|---|---|
ModelScope | ModelScopeEndpoint | langchain-modelscope-integration | ❌ | ❌ |
Setup
To access ModelScope models you'll need to create a ModelScope account, get an SDK token, and install the langchain-modelscope-integration
integration package.
Credentials
Head to ModelScope to sign up to ModelScope and generate an SDK token. Once you've done this set the MODELSCOPE_SDK_TOKEN
environment variable:
import getpass
import os
if not os.getenv("MODELSCOPE_SDK_TOKEN"):
os.environ["MODELSCOPE_SDK_TOKEN"] = getpass.getpass(
"Enter your ModelScope SDK token: "
)