Text Generation
Transformers
Safetensors
English
mistral
text-generation-inference
unsloth
conversational
Instructions to use ayan4m1/Chise-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ayan4m1/Chise-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ayan4m1/Chise-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ayan4m1/Chise-7B") model = AutoModelForCausalLM.from_pretrained("ayan4m1/Chise-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ayan4m1/Chise-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ayan4m1/Chise-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayan4m1/Chise-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ayan4m1/Chise-7B
- SGLang
How to use ayan4m1/Chise-7B 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 "ayan4m1/Chise-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayan4m1/Chise-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ayan4m1/Chise-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayan4m1/Chise-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use ayan4m1/Chise-7B 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 ayan4m1/Chise-7B 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 ayan4m1/Chise-7B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ayan4m1/Chise-7B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="ayan4m1/Chise-7B", max_seq_length=2048, ) - Docker Model Runner
How to use ayan4m1/Chise-7B with Docker Model Runner:
docker model run hf.co/ayan4m1/Chise-7B
ayan4m1 commited on
Commit ·
d8e2f73
1
Parent(s): 1e5f421
v0.2
Browse files- adapter_config.json +6 -6
- adapter_model.safetensors +1 -1
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
- tokenizer_config.json +3 -4
adapter_config.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
| 7 |
"parent_library": "transformers.models.mistral.modeling_mistral",
|
| 8 |
"unsloth_fixed": true
|
| 9 |
},
|
| 10 |
-
"base_model_name_or_path": "unsloth/mistral-7b-v0.3-bnb-4bit",
|
| 11 |
"bias": "none",
|
| 12 |
"corda_config": null,
|
| 13 |
"ensure_weight_tying": false,
|
|
@@ -33,13 +33,13 @@
|
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
| 36 |
-
"o_proj",
|
| 37 |
-
"gate_proj",
|
| 38 |
"down_proj",
|
| 39 |
-
"k_proj",
|
| 40 |
-
"up_proj",
|
| 41 |
"q_proj",
|
| 42 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 7 |
"parent_library": "transformers.models.mistral.modeling_mistral",
|
| 8 |
"unsloth_fixed": true
|
| 9 |
},
|
| 10 |
+
"base_model_name_or_path": "unsloth/mistral-7b-instruct-v0.3-bnb-4bit",
|
| 11 |
"bias": "none",
|
| 12 |
"corda_config": null,
|
| 13 |
"ensure_weight_tying": false,
|
|
|
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
|
|
|
|
|
|
| 36 |
"down_proj",
|
|
|
|
|
|
|
| 37 |
"q_proj",
|
| 38 |
+
"up_proj",
|
| 39 |
+
"v_proj",
|
| 40 |
+
"o_proj",
|
| 41 |
+
"k_proj",
|
| 42 |
+
"gate_proj"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 167832240
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c22321d56011b94408dcdbe9de2b4b37953eadb643c8911550aa55c701eddbf1
|
| 3 |
size 167832240
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4949453792
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d1cf7465638f5db9e90b65086ff5b37069c714969517a4f70601680ba99b9bb7
|
| 3 |
size 4949453792
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999819336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a42e4360dfc0e4c854c11c54d8b34ad346e00116673601a320a4a33a62427bb
|
| 3 |
size 4999819336
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4546807800
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d7db2f37a8841cc545d86ce0651227ce9a674566a00218e4edc271fed4fc1e18
|
| 3 |
size 4546807800
|
tokenizer_config.json
CHANGED
|
@@ -8,11 +8,10 @@
|
|
| 8 |
"legacy": false,
|
| 9 |
"model_max_length": 32768,
|
| 10 |
"pad_token": "[control_768]",
|
| 11 |
-
"padding_side": "
|
| 12 |
"sp_model_kwargs": {},
|
| 13 |
"spaces_between_special_tokens": false,
|
| 14 |
"tokenizer_class": "TokenizersBackend",
|
| 15 |
"unk_token": "<unk>",
|
| 16 |
-
"use_default_system_prompt": false
|
| 17 |
-
|
| 18 |
-
}
|
|
|
|
| 8 |
"legacy": false,
|
| 9 |
"model_max_length": 32768,
|
| 10 |
"pad_token": "[control_768]",
|
| 11 |
+
"padding_side": "right",
|
| 12 |
"sp_model_kwargs": {},
|
| 13 |
"spaces_between_special_tokens": false,
|
| 14 |
"tokenizer_class": "TokenizersBackend",
|
| 15 |
"unk_token": "<unk>",
|
| 16 |
+
"use_default_system_prompt": false
|
| 17 |
+
}
|
|
|