Instructions to use brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction") model = AutoModelForCausalLM.from_pretrained("brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction
- SGLang
How to use brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction 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 "brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction" \ --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": "brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction", "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 "brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction" \ --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": "brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction with Docker Model Runner:
docker model run hf.co/brucethemoose/Capybara-Tess-Yi-34B-200K-exl2-4bpw-fiction
Nous-Capybara-34B and Tess-M-Creative-v1.0 merged, then quantized with exllamav2 on 200 rows (400K tokens) on a long Vicuna format chat, a sci fi story and a fantasy story. This should hopefully yield better chat performance than the default wikitext quantization.
Quantized to 4bpw, enough for ~47K context on a 24GB GPU.
The following merge config was used:
models:
- model: /home/alpha/Storage/Models/Raw/larryvrh_Yi-34B-200K-Llamafied
# no parameters necessary for base model
- model: /home/alpha/Storage/Models/Raw/migtissera_Tess-M-v1.0
parameters:
density: 0.6
weight: 1.0
- model: /home/alpha/Storage/Models/Raw/Nous-Capybara-34B
parameters:
density: 0.6
weight: 1.0
merge_method: ties
base_model: //home/alpha/Storage/Models/Raw/larryvrh_Yi-34B-200K-Llamafied
parameters:
normalize: true
int8_mask: true
dtype: float16
First exllama quantization pass:
python convert.py --in_dir /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K -o /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K-exl2 -om /home/alpha/FastModels/capytessmes.json --cal_dataset /home/alpha/Documents/smol.parquet -l 2048 -r 80 -ml 2048 -mr 40 -gr 40 -ss 4096 -nr -b 3.5 -hb 6
Second exllama quantization pass:
python convert.py --in_dir /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K -o /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K-exl2 -m /home/alpha/FastModels/capytessmes.json --cal_dataset /home/alpha/Documents/medium.parquet -l 2048 -r 200 -ml 2048 -mr 40 -gr 200 -ss 4096 -b 3.1 -hb 6 -cf /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K-exl2-31bpw -nr
Both models have Vicuna syntax, so:
Prompt Format:
SYSTEM: ...
USER: ...
ASSISTANT: ...
Stop token: </s>
Credits:
https://github.com/cg123/mergekit
https://huggingface.co/NousResearch/Nous-Capybara-34B/discussions
https://huggingface.co/migtissera/Tess-M-Creative-v1.0
- Downloads last month
- 8