Instructions to use LinkSoul/LLaSM-Cllama2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LinkSoul/LLaSM-Cllama2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LinkSoul/LLaSM-Cllama2")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("LinkSoul/LLaSM-Cllama2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LinkSoul/LLaSM-Cllama2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LinkSoul/LLaSM-Cllama2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LinkSoul/LLaSM-Cllama2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LinkSoul/LLaSM-Cllama2
- SGLang
How to use LinkSoul/LLaSM-Cllama2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "LinkSoul/LLaSM-Cllama2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LinkSoul/LLaSM-Cllama2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "LinkSoul/LLaSM-Cllama2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LinkSoul/LLaSM-Cllama2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LinkSoul/LLaSM-Cllama2 with Docker Model Runner:
docker model run hf.co/LinkSoul/LLaSM-Cllama2
|
Download README.md from LinkSoul/LLaSM-Cllama2: direct link, hf CLI and curl.
- Browser
- Download file 2.33 kB
-
https://huggingface.co/LinkSoul/LLaSM-Cllama2/resolve/main/README.md
- Command line
-
hf download hf://LinkSoul/LLaSM-Cllama2/README.md
-
curl -L -o README.md https://huggingface.co/LinkSoul/LLaSM-Cllama2/resolve/main/README.md
2.33 kB
metadata
license: openrail
datasets:
- LinkSoul/LLaSM-Audio-Instructions
language:
- zh
- en
LLaSM: Large Language and Speech Model
开源,可商用的中英文双语语音-语言助手 LLaSM 以及中英文语音 SFT 数据集 LLaSM-Audio-Instructions,第一个支持中英文语音-文本多模态对话的开源可商用对话模型。
基础演示
在线试玩
Talk is cheap, Show you the Demo.
资源下载
模型:
百度网盘下载:
语言模型:
环境安装
# clone the repository
git clone https://github.com/LinkSoul-AI/LLaSM
cd LLaSM
# install package
conda create -n llasm python=3.10 -y
conda activate llasm
pip install --upgrade pip
pip install -e .
快速测试
export LLASM_DEVICE="cuda:0"
python infer.py \
--input_audio_file PATH/TO/YOUR/AUDIO \
--llasm_model PATH/TO/LLaSM/MODEL \
--llasm_audio_tower PATH/TO/WHISPER/MODEL \
--llm_type "Chinese_llama2" or "baichuan" \
TODO
- 如何训练
- int4 量化
- docker 部署
相关项目
项目协议
微信交流群
欢迎加入微信群

