Instructions to use xfcxcxcdfdfd/1hbit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xfcxcxcdfdfd/1hbit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xfcxcxcdfdfd/1hbit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("xfcxcxcdfdfd/1hbit") model = AutoModelForCausalLM.from_pretrained("xfcxcxcdfdfd/1hbit") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use xfcxcxcdfdfd/1hbit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xfcxcxcdfdfd/1hbit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xfcxcxcdfdfd/1hbit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xfcxcxcdfdfd/1hbit
- SGLang
How to use xfcxcxcdfdfd/1hbit 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 "xfcxcxcdfdfd/1hbit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xfcxcxcdfdfd/1hbit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "xfcxcxcdfdfd/1hbit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xfcxcxcdfdfd/1hbit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xfcxcxcdfdfd/1hbit with Docker Model Runner:
docker model run hf.co/xfcxcxcdfdfd/1hbit
Upload folder using huggingface_hub
Browse files
pytorch_model-00001-of-00002.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f793a1eed262ceced707cdaf8c33d1c77427e5d59fa8b1a98d512a7d41a5f94
|
| 3 |
+
size 4838615042
|
pytorch_model-00002-of-00002.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:624c1d90e368e405dffb098c06432835a9c4e5c89f1427cf477e405c3bf27d26
|
| 3 |
+
size 3227594782
|
pytorch_model.bin.index.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_size":
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
-
"draft_model.embed_tokens.weight": "pytorch_model-
|
| 7 |
"draft_model.emotion_vector": "pytorch_model-00001-of-00002.bin",
|
| 8 |
"draft_model.lm_head.weight": "pytorch_model-00002-of-00002.bin",
|
| 9 |
"draft_model.memory_keys": "pytorch_model-00001-of-00002.bin",
|
| 10 |
"draft_model.memory_values": "pytorch_model-00001-of-00002.bin",
|
| 11 |
-
"draft_model.norm.bias": "pytorch_model-
|
| 12 |
-
"draft_model.norm.weight": "pytorch_model-
|
| 13 |
"draft_model.prediction_head.bias": "pytorch_model-00002-of-00002.bin",
|
| 14 |
"draft_model.prediction_head.weight": "pytorch_model-00002-of-00002.bin",
|
| 15 |
"draft_model.response_selector.bias": "pytorch_model-00002-of-00002.bin",
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_size": 8066187280
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
+
"draft_model.embed_tokens.weight": "pytorch_model-00002-of-00002.bin",
|
| 7 |
"draft_model.emotion_vector": "pytorch_model-00001-of-00002.bin",
|
| 8 |
"draft_model.lm_head.weight": "pytorch_model-00002-of-00002.bin",
|
| 9 |
"draft_model.memory_keys": "pytorch_model-00001-of-00002.bin",
|
| 10 |
"draft_model.memory_values": "pytorch_model-00001-of-00002.bin",
|
| 11 |
+
"draft_model.norm.bias": "pytorch_model-00002-of-00002.bin",
|
| 12 |
+
"draft_model.norm.weight": "pytorch_model-00002-of-00002.bin",
|
| 13 |
"draft_model.prediction_head.bias": "pytorch_model-00002-of-00002.bin",
|
| 14 |
"draft_model.prediction_head.weight": "pytorch_model-00002-of-00002.bin",
|
| 15 |
"draft_model.response_selector.bias": "pytorch_model-00002-of-00002.bin",
|