Instructions to use DJPanda02/model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DJPanda02/model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DJPanda02/model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DJPanda02/model") model = AutoModelForCausalLM.from_pretrained("DJPanda02/model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DJPanda02/model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DJPanda02/model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DJPanda02/model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DJPanda02/model
- SGLang
How to use DJPanda02/model 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 "DJPanda02/model" \ --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": "DJPanda02/model", "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 "DJPanda02/model" \ --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": "DJPanda02/model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use DJPanda02/model 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 DJPanda02/model 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 DJPanda02/model to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for DJPanda02/model to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="DJPanda02/model", max_seq_length=2048, ) - Docker Model Runner
How to use DJPanda02/model with Docker Model Runner:
docker model run hf.co/DJPanda02/model
Trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- config.json +1 -13
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +0 -0
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "unsloth/llama-3-8b
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
@@ -17,18 +17,6 @@
|
|
| 17 |
"num_hidden_layers": 32,
|
| 18 |
"num_key_value_heads": 8,
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
-
"quantization_config": {
|
| 21 |
-
"bnb_4bit_compute_dtype": "float16",
|
| 22 |
-
"bnb_4bit_quant_type": "nf4",
|
| 23 |
-
"bnb_4bit_use_double_quant": true,
|
| 24 |
-
"llm_int8_enable_fp32_cpu_offload": false,
|
| 25 |
-
"llm_int8_has_fp16_weight": false,
|
| 26 |
-
"llm_int8_skip_modules": null,
|
| 27 |
-
"llm_int8_threshold": 6.0,
|
| 28 |
-
"load_in_4bit": true,
|
| 29 |
-
"load_in_8bit": false,
|
| 30 |
-
"quant_method": "bitsandbytes"
|
| 31 |
-
},
|
| 32 |
"rms_norm_eps": 1e-05,
|
| 33 |
"rope_scaling": null,
|
| 34 |
"rope_theta": 500000.0,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "unsloth/llama-3-8b",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
| 17 |
"num_hidden_layers": 32,
|
| 18 |
"num_key_value_heads": 8,
|
| 19 |
"pretraining_tp": 1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
"rms_norm_eps": 1e-05,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 500000.0,
|
model-00001-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a5db689b8b7c4e909db091bdbb7ff0d6e4f3a2b6d4bc594c0eff34493014efea
|
| 3 |
+
size 4976698592
|
model-00002-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5737bb752d56d9e94f66566815b24fc84d006b19500e064d8452ee13f9340e3a
|
| 3 |
+
size 4999802616
|
model-00003-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a76df6d31fcd96a65f42dce5df0dcf92afed88b4450b6f7298611d1578208c2
|
| 3 |
+
size 4915916080
|
model-00004-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3e343bde652150cd0b8ac59f7e451863d9bf5d492d87fddb74df9c3ca2698e3
|
| 3 |
+
size 1168138808
|
model.safetensors.index.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|