Instructions to use ewof/koishi-8x7b-qlora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ewof/koishi-8x7b-qlora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ewof/koishi-8x7b-qlora")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ewof/koishi-8x7b-qlora") model = AutoModelForCausalLM.from_pretrained("ewof/koishi-8x7b-qlora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ewof/koishi-8x7b-qlora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ewof/koishi-8x7b-qlora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ewof/koishi-8x7b-qlora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ewof/koishi-8x7b-qlora
- SGLang
How to use ewof/koishi-8x7b-qlora 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 "ewof/koishi-8x7b-qlora" \ --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": "ewof/koishi-8x7b-qlora", "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 "ewof/koishi-8x7b-qlora" \ --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": "ewof/koishi-8x7b-qlora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ewof/koishi-8x7b-qlora with Docker Model Runner:
docker model run hf.co/ewof/koishi-8x7b-qlora
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
datasets:
|
| 3 |
+
- ewof/koishi-instruct-metharme
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
## Training
|
| 7 |
+
|
| 8 |
+
[axolotl](https://github.com/OpenAccess-AI-Collective/axolotl) was used for training
|
| 9 |
+
on a 4x nvidia a100 gpu cluster.
|
| 10 |
+
|
| 11 |
+
the a100 GPU cluster has been graciously provided by [lloorree](https://huggingface.co/lloorree).
|
| 12 |
+
|
| 13 |
+
trained on koishi commit 6e675d1 for one epoch
|
| 14 |
+
|
| 15 |
+
## Base Model
|
| 16 |
+
|
| 17 |
+
rank 16 qlora tune of mistralai/Mixtral-8x7B-v0.1 (all modules, merged)
|
| 18 |
+
|
| 19 |
+
## Prompting
|
| 20 |
+
|
| 21 |
+
The current model version has been trained on prompts using three different roles, which are denoted by the following tokens: `<|system|>`, `<|user|>` and `<|model|>`.
|
| 22 |
+
|
| 23 |
+
The `<|system|>` prompt can be used to inject out-of-channel information behind the scenes, while the `<|user|>` prompt should be used to indicate user input. The `<|model|>` token should then be used to indicate that the model should generate a response. These tokens can happen multiple times and be chained up to form a conversation history.
|