Text Generation
Transformers
PyTorch
Safetensors
mistral
axolotl
Generated from Trainer
text-generation-inference
conversational
Instructions to use bitext/Mistral-7B-Customer-Support with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bitext/Mistral-7B-Customer-Support with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bitext/Mistral-7B-Customer-Support") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bitext/Mistral-7B-Customer-Support") model = AutoModelForCausalLM.from_pretrained("bitext/Mistral-7B-Customer-Support") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bitext/Mistral-7B-Customer-Support with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bitext/Mistral-7B-Customer-Support" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bitext/Mistral-7B-Customer-Support", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bitext/Mistral-7B-Customer-Support
- SGLang
How to use bitext/Mistral-7B-Customer-Support 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 "bitext/Mistral-7B-Customer-Support" \ --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": "bitext/Mistral-7B-Customer-Support", "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 "bitext/Mistral-7B-Customer-Support" \ --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": "bitext/Mistral-7B-Customer-Support", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use bitext/Mistral-7B-Customer-Support with Docker Model Runner:
docker model run hf.co/bitext/Mistral-7B-Customer-Support
Mohammad Bani Almarjeh commited on
Commit ·
741811a
1
Parent(s): e6a67bf
delete adapter files
Browse files- adapter_config.json +0 -34
- adapter_model.bin +0 -3
- adapter_model.safetensors +0 -3
adapter_config.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"alpha_pattern": {},
|
| 3 |
-
"auto_mapping": null,
|
| 4 |
-
"base_model_name_or_path": "mistralai/Mistral-7B-Instruct-v0.2",
|
| 5 |
-
"bias": "none",
|
| 6 |
-
"fan_in_fan_out": null,
|
| 7 |
-
"inference_mode": true,
|
| 8 |
-
"init_lora_weights": true,
|
| 9 |
-
"layer_replication": null,
|
| 10 |
-
"layers_pattern": null,
|
| 11 |
-
"layers_to_transform": null,
|
| 12 |
-
"loftq_config": {},
|
| 13 |
-
"lora_alpha": 16,
|
| 14 |
-
"lora_dropout": 0.05,
|
| 15 |
-
"megatron_config": null,
|
| 16 |
-
"megatron_core": "megatron.core",
|
| 17 |
-
"modules_to_save": null,
|
| 18 |
-
"peft_type": "LORA",
|
| 19 |
-
"r": 32,
|
| 20 |
-
"rank_pattern": {},
|
| 21 |
-
"revision": null,
|
| 22 |
-
"target_modules": [
|
| 23 |
-
"k_proj",
|
| 24 |
-
"gate_proj",
|
| 25 |
-
"o_proj",
|
| 26 |
-
"up_proj",
|
| 27 |
-
"down_proj",
|
| 28 |
-
"v_proj",
|
| 29 |
-
"q_proj"
|
| 30 |
-
],
|
| 31 |
-
"task_type": "CAUSAL_LM",
|
| 32 |
-
"use_dora": false,
|
| 33 |
-
"use_rslora": false
|
| 34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adapter_model.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c66148ab3f17b4c38acff85de9031b10ba96b94d962dca63eae6d46d52f6575f
|
| 3 |
-
size 335706186
|
|
|
|
|
|
|
|
|
|
|
|
adapter_model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:ead14690089ca6f5a4c00f79636628662b6ecdfb1bf6f214e91a55cbf76c44e8
|
| 3 |
-
size 335604696
|
|
|
|
|
|
|
|
|
|
|
|