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 Settings
- 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
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
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- HuggingFaceTB/cosmopedia
|
| 5 |
+
- databricks/databricks-dolly-15k
|
| 6 |
+
- Open-Orca/OpenOrca
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
metrics:
|
| 10 |
+
- accuracy
|
| 11 |
+
library_name: transformers
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
# WikiChat-v0.2
|
| 16 |
+
Training in progress model to have conversations.
|
| 17 |
+
|
| 18 |
+
The GGUFs uploaded are full FP32 precision.
|
| 19 |
+
|
| 20 |
+
Using OpenOrca GPT-4 data + cosmopedia for some extra data + dolly15k for instruct
|
| 21 |
+
|
| 22 |
+
## Model Details:
|
| 23 |
+
- 40M parameters
|
| 24 |
+
- 8 attention heads
|
| 25 |
+
- 32 layers
|
| 26 |
+
- 384 embeddings size
|
| 27 |
+
- 2048/8192 context (please use 4x RoPE scaling)
|
| 28 |
+
|
| 29 |
+
## Prompt Format (Alpaca):
|
| 30 |
+
```
|
| 31 |
+
Instruction: {system}
|
| 32 |
+
Input: {prompt}
|
| 33 |
+
Response: {response}
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
Please structure your prompts in an instruct format for maximum performance.
|
| 37 |
+
|
| 38 |
+
## Training Details:
|
| 39 |
+
- 1x RTX 3070 8GB (Infrencing speed: 80tok/s, full GPU offload)
|
| 40 |
+
- 1x Ryzen 3 3700x
|
| 41 |
+
- 96gb RAM
|
| 42 |
+
- 10 iterations
|
| 43 |
+
- Loss Target = 2.5 to 3.0
|
| 44 |
+
- Approx 30 samples (>0.0001 epoches)
|
| 45 |
+
- Training data = Refer to OpenOrca page
|
| 46 |
+
|
| 47 |
+
## Notes:
|
| 48 |
+
|
| 49 |
+
The model isn't ready yet; this is to test tokenization of OpenOrca and a balance between training speed and model size
|
| 50 |
+
|
| 51 |
+
## Example output:
|
| 52 |
+
```
|
| 53 |
+
User: What is the square root of 4?
|
| 54 |
+
```
|
| 55 |
+
```
|
| 56 |
+
Assistant: The square root of 4 is 2.
|
| 57 |
+
```
|