Instructions to use KnutJaegersberg/Tess-M-34B-2bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KnutJaegersberg/Tess-M-34B-2bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KnutJaegersberg/Tess-M-34B-2bit")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KnutJaegersberg/Tess-M-34B-2bit") model = AutoModelForCausalLM.from_pretrained("KnutJaegersberg/Tess-M-34B-2bit") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use KnutJaegersberg/Tess-M-34B-2bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KnutJaegersberg/Tess-M-34B-2bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KnutJaegersberg/Tess-M-34B-2bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KnutJaegersberg/Tess-M-34B-2bit
- SGLang
How to use KnutJaegersberg/Tess-M-34B-2bit 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 "KnutJaegersberg/Tess-M-34B-2bit" \ --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": "KnutJaegersberg/Tess-M-34B-2bit", "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 "KnutJaegersberg/Tess-M-34B-2bit" \ --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": "KnutJaegersberg/Tess-M-34B-2bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KnutJaegersberg/Tess-M-34B-2bit with Docker Model Runner:
docker model run hf.co/KnutJaegersberg/Tess-M-34B-2bit
This is a 2-bit quantization of @migtissera Tess-M-34b-v1.4 using quip# (https://cornell-relaxml.github.io/quip-sharp/) with hessian context lenght 8k.
"Tess, short for Tesoro (Treasure in Italian), is a general purpose Large Language Model series. Tess-M-v1.4 was trained on the Yi-34B-200K base."
Perplexity on the dev set as repoted by quip# was slightly below 7 compared to slightly below 6 of the original. Inference with the model is a bit slow, but with the long context length it should provide one of the best performing few-shot models for consumer and data science GPUs, especially if the instances are longer and the answers relatively short.
Prompt Format:
SYSTEM: <ANY SYSTEM CONTEXT>
USER:
ASSISTANT:
I am able to use this model in the widely known textgen-webui. For installation I suggest to follow these steps:
- Put the current quip# library folder into the repositories folder of the textgen-webui folder.
- install the requirements of quip#
- compile and install the quiptools cuda lib:
pip install fast-hadamard-transform glog==0.3.1 primefac==2.0.12
cd repositories/quip-sharp/quiptools
python setup.py install --force
- reinstall the requirements of textgen-webui
- load the model with the quip# integration of textgen-webui
You can use the library of this repo also for scripts. Within the quip# folder, after installing the library, use this command:
python interactive_gen.py --hf_path path_to_the_2bitmodel --max_length 500
License The Yi series models are fully open for academic research and free commercial usage with permission via applications. All usage must adhere to the Model License Agreement 2.0. To apply for the official commercial license, please contact us (yi@01.ai).
- Downloads last month
- 10
