Instructions to use sixfingerdev/SixFinger-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sixfingerdev/SixFinger-8B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/meta-llama-3.1-8b-bnb-4bit") model = PeftModel.from_pretrained(base_model, "sixfingerdev/SixFinger-8B") - Transformers
How to use sixfingerdev/SixFinger-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sixfingerdev/SixFinger-8B")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sixfingerdev/SixFinger-8B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sixfingerdev/SixFinger-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sixfingerdev/SixFinger-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sixfingerdev/SixFinger-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sixfingerdev/SixFinger-8B
- SGLang
How to use sixfingerdev/SixFinger-8B 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 "sixfingerdev/SixFinger-8B" \ --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": "sixfingerdev/SixFinger-8B", "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 "sixfingerdev/SixFinger-8B" \ --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": "sixfingerdev/SixFinger-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use sixfingerdev/SixFinger-8B 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 sixfingerdev/SixFinger-8B 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 sixfingerdev/SixFinger-8B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for sixfingerdev/SixFinger-8B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="sixfingerdev/SixFinger-8B", max_seq_length=2048, ) - Docker Model Runner
How to use sixfingerdev/SixFinger-8B with Docker Model Runner:
docker model run hf.co/sixfingerdev/SixFinger-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -74,20 +74,31 @@ Ensure you have a GPU with sufficient VRAM for 4-bit inference.
|
|
| 74 |
## Example Usage
|
| 75 |
|
| 76 |
Generate text using the adapter:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
' **inputs,'
|
| 84 |
-
' max_new_tokens=50,'
|
| 85 |
-
' do_sample=True,'
|
| 86 |
-
' temperature=0.7'
|
| 87 |
-
' )'
|
| 88 |
|
| 89 |
-
|
|
|
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
---
|
| 92 |
|
| 93 |
## Notes
|
|
|
|
| 74 |
## Example Usage
|
| 75 |
|
| 76 |
Generate text using the adapter:
|
| 77 |
+
```python
|
| 78 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 79 |
+
from peft import PeftModel
|
| 80 |
+
import torch
|
| 81 |
|
| 82 |
+
# Base model
|
| 83 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 84 |
+
"unsloth/llama-3.1-8b-bnb-4bit",
|
| 85 |
+
device_map="auto"
|
| 86 |
+
)
|
| 87 |
|
| 88 |
+
# LoRA adapter
|
| 89 |
+
model = PeftModel.from_pretrained(base_model, "sixfingerdev/SixFinger-8B")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
+
# Tokenizer
|
| 92 |
+
tokenizer = AutoTokenizer.from_pretrained("unsloth/llama-3.1-8b-bnb-4bit")
|
| 93 |
|
| 94 |
+
# Örnek text generation
|
| 95 |
+
prompt = "Soru: Yapay zeka nedir?\nCevap:"
|
| 96 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 97 |
+
with torch.no_grad():
|
| 98 |
+
outputs = model.generate(**inputs, max_new_tokens=50, do_sample=True, temperature=0.7)
|
| 99 |
+
|
| 100 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 101 |
+
```
|
| 102 |
---
|
| 103 |
|
| 104 |
## Notes
|