Text Generation
Transformers
Safetensors
mistral
unsloth
trl
sft
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use codegood/DistHermYam-7B-ties-bnb-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codegood/DistHermYam-7B-ties-bnb-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="codegood/DistHermYam-7B-ties-bnb-4bit")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("codegood/DistHermYam-7B-ties-bnb-4bit") model = AutoModelForCausalLM.from_pretrained("codegood/DistHermYam-7B-ties-bnb-4bit") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use codegood/DistHermYam-7B-ties-bnb-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "codegood/DistHermYam-7B-ties-bnb-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "codegood/DistHermYam-7B-ties-bnb-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/codegood/DistHermYam-7B-ties-bnb-4bit
- SGLang
How to use codegood/DistHermYam-7B-ties-bnb-4bit 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 "codegood/DistHermYam-7B-ties-bnb-4bit" \ --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": "codegood/DistHermYam-7B-ties-bnb-4bit", "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 "codegood/DistHermYam-7B-ties-bnb-4bit" \ --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": "codegood/DistHermYam-7B-ties-bnb-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio new
How to use codegood/DistHermYam-7B-ties-bnb-4bit with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for codegood/DistHermYam-7B-ties-bnb-4bit to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for codegood/DistHermYam-7B-ties-bnb-4bit to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for codegood/DistHermYam-7B-ties-bnb-4bit to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="codegood/DistHermYam-7B-ties-bnb-4bit", max_seq_length=2048, ) - Docker Model Runner
How to use codegood/DistHermYam-7B-ties-bnb-4bit with Docker Model Runner:
docker model run hf.co/codegood/DistHermYam-7B-ties-bnb-4bit
Trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- special_tokens_map.json +1 -7
- tokenizer.json +0 -27
- tokenizer_config.json +2 -3
special_tokens_map.json
CHANGED
|
@@ -13,13 +13,7 @@
|
|
| 13 |
"rstrip": false,
|
| 14 |
"single_word": false
|
| 15 |
},
|
| 16 |
-
"pad_token":
|
| 17 |
-
"content": "</s>",
|
| 18 |
-
"lstrip": false,
|
| 19 |
-
"normalized": false,
|
| 20 |
-
"rstrip": false,
|
| 21 |
-
"single_word": false
|
| 22 |
-
},
|
| 23 |
"unk_token": {
|
| 24 |
"content": "<unk>",
|
| 25 |
"lstrip": false,
|
|
|
|
| 13 |
"rstrip": false,
|
| 14 |
"single_word": false
|
| 15 |
},
|
| 16 |
+
"pad_token": "<unk>",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
"unk_token": {
|
| 18 |
"content": "<unk>",
|
| 19 |
"lstrip": false,
|
tokenizer.json
CHANGED
|
@@ -62,12 +62,6 @@
|
|
| 62 |
"id": "A",
|
| 63 |
"type_id": 0
|
| 64 |
}
|
| 65 |
-
},
|
| 66 |
-
{
|
| 67 |
-
"SpecialToken": {
|
| 68 |
-
"id": "</s>",
|
| 69 |
-
"type_id": 0
|
| 70 |
-
}
|
| 71 |
}
|
| 72 |
],
|
| 73 |
"pair": [
|
|
@@ -83,12 +77,6 @@
|
|
| 83 |
"type_id": 0
|
| 84 |
}
|
| 85 |
},
|
| 86 |
-
{
|
| 87 |
-
"SpecialToken": {
|
| 88 |
-
"id": "</s>",
|
| 89 |
-
"type_id": 0
|
| 90 |
-
}
|
| 91 |
-
},
|
| 92 |
{
|
| 93 |
"SpecialToken": {
|
| 94 |
"id": "<s>",
|
|
@@ -100,24 +88,9 @@
|
|
| 100 |
"id": "B",
|
| 101 |
"type_id": 1
|
| 102 |
}
|
| 103 |
-
},
|
| 104 |
-
{
|
| 105 |
-
"SpecialToken": {
|
| 106 |
-
"id": "</s>",
|
| 107 |
-
"type_id": 1
|
| 108 |
-
}
|
| 109 |
}
|
| 110 |
],
|
| 111 |
"special_tokens": {
|
| 112 |
-
"</s>": {
|
| 113 |
-
"id": "</s>",
|
| 114 |
-
"ids": [
|
| 115 |
-
2
|
| 116 |
-
],
|
| 117 |
-
"tokens": [
|
| 118 |
-
"</s>"
|
| 119 |
-
]
|
| 120 |
-
},
|
| 121 |
"<s>": {
|
| 122 |
"id": "<s>",
|
| 123 |
"ids": [
|
|
|
|
| 62 |
"id": "A",
|
| 63 |
"type_id": 0
|
| 64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
}
|
| 66 |
],
|
| 67 |
"pair": [
|
|
|
|
| 77 |
"type_id": 0
|
| 78 |
}
|
| 79 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
{
|
| 81 |
"SpecialToken": {
|
| 82 |
"id": "<s>",
|
|
|
|
| 88 |
"id": "B",
|
| 89 |
"type_id": 1
|
| 90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
}
|
| 92 |
],
|
| 93 |
"special_tokens": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
"<s>": {
|
| 95 |
"id": "<s>",
|
| 96 |
"ids": [
|
tokenizer_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
-
"add_eos_token":
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
@@ -30,11 +30,10 @@
|
|
| 30 |
"additional_special_tokens": [],
|
| 31 |
"bos_token": "<s>",
|
| 32 |
"clean_up_tokenization_spaces": false,
|
| 33 |
-
"device_map": "auto",
|
| 34 |
"eos_token": "</s>",
|
| 35 |
"legacy": true,
|
| 36 |
"model_max_length": 32768,
|
| 37 |
-
"pad_token": "<
|
| 38 |
"padding_side": "right",
|
| 39 |
"sp_model_kwargs": {},
|
| 40 |
"spaces_between_special_tokens": false,
|
|
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
|
|
| 30 |
"additional_special_tokens": [],
|
| 31 |
"bos_token": "<s>",
|
| 32 |
"clean_up_tokenization_spaces": false,
|
|
|
|
| 33 |
"eos_token": "</s>",
|
| 34 |
"legacy": true,
|
| 35 |
"model_max_length": 32768,
|
| 36 |
+
"pad_token": "<unk>",
|
| 37 |
"padding_side": "right",
|
| 38 |
"sp_model_kwargs": {},
|
| 39 |
"spaces_between_special_tokens": false,
|