Guidance中文指导教程
一、conda create
conda create -n guidance python=3.10
二、pytorch
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
pip install guidance
三、pip transformers版本坑
pip install transformer==4.37.0
4.38会报错
四、其他需要安装的包
pip install accelerate
安装即可
cora需要安装下列包
sentencepiece
protobuf
bitsandbytes
scipy
下载模版guidance pemplate
download template from github:
https://github.com/guidance-ai/guidance
example:
https://github.com/ghazaleh-mahmoodi/Prompting_LLMs_AS_Explainable_Metrics