Instructions to use leafspark/wikichat-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use leafspark/wikichat-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="leafspark/wikichat-v2")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("leafspark/wikichat-v2", dtype="auto") - llama-cpp-python
How to use leafspark/wikichat-v2 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="leafspark/wikichat-v2", filename="chk-wikichat2-384x32-16-test.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use leafspark/wikichat-v2 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf leafspark/wikichat-v2:F32 # Run inference directly in the terminal: llama-cli -hf leafspark/wikichat-v2:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf leafspark/wikichat-v2:F32 # Run inference directly in the terminal: llama-cli -hf leafspark/wikichat-v2:F32
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 leafspark/wikichat-v2:F32 # Run inference directly in the terminal: ./llama-cli -hf leafspark/wikichat-v2:F32
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 leafspark/wikichat-v2:F32 # Run inference directly in the terminal: ./build/bin/llama-cli -hf leafspark/wikichat-v2:F32
Use Docker
docker model run hf.co/leafspark/wikichat-v2:F32
- LM Studio
- Jan
- vLLM
How to use leafspark/wikichat-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leafspark/wikichat-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leafspark/wikichat-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/leafspark/wikichat-v2:F32
- SGLang
How to use leafspark/wikichat-v2 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 "leafspark/wikichat-v2" \ --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": "leafspark/wikichat-v2", "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 "leafspark/wikichat-v2" \ --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": "leafspark/wikichat-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use leafspark/wikichat-v2 with Ollama:
ollama run hf.co/leafspark/wikichat-v2:F32
- Unsloth Studio new
How to use leafspark/wikichat-v2 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 leafspark/wikichat-v2 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 leafspark/wikichat-v2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for leafspark/wikichat-v2 to start chatting
- Docker Model Runner
How to use leafspark/wikichat-v2 with Docker Model Runner:
docker model run hf.co/leafspark/wikichat-v2:F32
- Lemonade
How to use leafspark/wikichat-v2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull leafspark/wikichat-v2:F32
Run and chat with the model
lemonade run user.wikichat-v2-F32
List all available models
lemonade list
output = llm(
"Once upon a time,",
max_tokens=512,
echo=True
)
print(output)WikiChat-v0.2
Training in progress model to have conversations.
The GGUFs uploaded are full FP32 precision.
Using OpenOrca GPT-4 data + cosmopedia for some extra data + dolly15k for instruct
Model Details:
- 83.59M parameters (83591800)
- 8 attention heads
- 40 layers
- 384 embeddings size
- 4096/8192/16384 context (please use 2/4x RoPE scaling, may train a 16k finetuned version later)
- Batch size 16
- llama.cpp (train-text-from-scratch)
Prompt Format (Alpaca):
Instruction: {system}
Input: {prompt}
Response: {response}
Please structure your prompts in an instruct format for maximum performance.
Training Details:
- 1x RTX 3070 8GB (Infrencing speed: 80tok/s, full GPU offload)
- 1x Ryzen 3 3700x
- 96gb RAM
- 10 iterations
- Loss Target = 2.5 to 3.0
- Approx 480 samples/1M train tokens (>0.0001 epoches)
- Training data = Refer to OpenOrca page
Notes:
The model isn't ready yet; this is to test tokenization of OpenOrca and a balance between training speed and model size
Example output:
User: What is the square root of 4?
Assistant: The square root of 4 is 2.
- Downloads last month
- 65
32-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="leafspark/wikichat-v2", filename="", )