Instructions to use KasparZ/Mistral-7B-v0.1-hitl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KasparZ/Mistral-7B-v0.1-hitl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KasparZ/Mistral-7B-v0.1-hitl")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KasparZ/Mistral-7B-v0.1-hitl") model = AutoModelForCausalLM.from_pretrained("KasparZ/Mistral-7B-v0.1-hitl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use KasparZ/Mistral-7B-v0.1-hitl with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf KasparZ/Mistral-7B-v0.1-hitl # Run inference directly in the terminal: llama cli -hf KasparZ/Mistral-7B-v0.1-hitl
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf KasparZ/Mistral-7B-v0.1-hitl # Run inference directly in the terminal: llama cli -hf KasparZ/Mistral-7B-v0.1-hitl
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf KasparZ/Mistral-7B-v0.1-hitl # Run inference directly in the terminal: ./llama-cli -hf KasparZ/Mistral-7B-v0.1-hitl
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf KasparZ/Mistral-7B-v0.1-hitl # Run inference directly in the terminal: ./build/bin/llama-cli -hf KasparZ/Mistral-7B-v0.1-hitl
Use Docker
docker model run hf.co/KasparZ/Mistral-7B-v0.1-hitl
- LM Studio
- Jan
- vLLM
How to use KasparZ/Mistral-7B-v0.1-hitl with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KasparZ/Mistral-7B-v0.1-hitl" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KasparZ/Mistral-7B-v0.1-hitl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KasparZ/Mistral-7B-v0.1-hitl
- SGLang
How to use KasparZ/Mistral-7B-v0.1-hitl 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 "KasparZ/Mistral-7B-v0.1-hitl" \ --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": "KasparZ/Mistral-7B-v0.1-hitl", "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 "KasparZ/Mistral-7B-v0.1-hitl" \ --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": "KasparZ/Mistral-7B-v0.1-hitl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use KasparZ/Mistral-7B-v0.1-hitl with Ollama:
ollama run hf.co/KasparZ/Mistral-7B-v0.1-hitl
- Unsloth Studio
How to use KasparZ/Mistral-7B-v0.1-hitl 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 KasparZ/Mistral-7B-v0.1-hitl 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 KasparZ/Mistral-7B-v0.1-hitl to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for KasparZ/Mistral-7B-v0.1-hitl to start chatting
- Docker Model Runner
How to use KasparZ/Mistral-7B-v0.1-hitl with Docker Model Runner:
docker model run hf.co/KasparZ/Mistral-7B-v0.1-hitl
- Lemonade
How to use KasparZ/Mistral-7B-v0.1-hitl with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull KasparZ/Mistral-7B-v0.1-hitl
Run and chat with the model
lemonade run user.Mistral-7B-v0.1-hitl-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
base_model = "mistralai/Mistral-7B-v0.1" dataset_name = "KasparZ/HITL-2"
load_in_4bit= True, bnb_4bit_quant_type= "nf4", bnb_4bit_compute_dtype= torch.bfloat16, bnb_4bit_use_double_quant= False,
device_map="auto", trust_remote_code=True,
lora_alpha=16, lora_dropout=0.1, r=64, bias="none", task_type="CAUSAL_LM", target_modules=["q_proj", "k_proj", "v_proj", "o_proj","gate_proj"]
model.gradient_checkpointing_enable()
tokenizer.padding_side = 'right' tokenizer.add_eos_token = True
num_train_epochs=4,
per_device_train_batch_size=4,
gradient_accumulation_steps=1,
optim="paged_adamw_32bit",
save_steps=50,
logging_steps=1,
learning_rate=2e-4,
weight_decay=0.001,
fp16=False,
bf16=False,
max_grad_norm=0.3,
max_steps=-1,
warmup_ratio=0.03,
group_by_length=True,
lr_scheduler_type="constant",
- Downloads last month
- 14