Instructions to use xfcxcxcdfdfd/1-bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xfcxcxcdfdfd/1-bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xfcxcxcdfdfd/1-bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("xfcxcxcdfdfd/1-bit") model = AutoModelForCausalLM.from_pretrained("xfcxcxcdfdfd/1-bit", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use xfcxcxcdfdfd/1-bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xfcxcxcdfdfd/1-bit" # 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/1-bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xfcxcxcdfdfd/1-bit
- SGLang
How to use xfcxcxcdfdfd/1-bit 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/1-bit" \ --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/1-bit", "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/1-bit" \ --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/1-bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xfcxcxcdfdfd/1-bit with Docker Model Runner:
docker model run hf.co/xfcxcxcdfdfd/1-bit
Download pytorch_model.bin.index.json from xfcxcxcdfdfd/1-bit: direct link, hf CLI and curl.
- Browser
- Download file 5.03 kB
-
https://huggingface.co/xfcxcxcdfdfd/1-bit/resolve/refs%2Fpr%2F1/pytorch_model.bin.index.json
- Command line
-
hf download hf://xfcxcxcdfdfd/1-bit@refs/pr/1/pytorch_model.bin.index.json
-
curl -L -o pytorch_model.bin.index.json https://huggingface.co/xfcxcxcdfdfd/1-bit/resolve/refs%2Fpr%2F1/pytorch_model.bin.index.json
5.03 kB
| { | |
| "metadata": { | |
| "total_size": 6490177552 | |
| }, | |
| "weight_map": { | |
| "draft_model.embed_tokens.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.emotion_vector": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.lm_head.weight": "pytorch_model-00002-of-00002.bin", | |
| "draft_model.memory_keys": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.memory_values": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.norm.bias": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.norm.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.prediction_head.bias": "pytorch_model-00002-of-00002.bin", | |
| "draft_model.prediction_head.weight": "pytorch_model-00002-of-00002.bin", | |
| "draft_model.response_selector.bias": "pytorch_model-00002-of-00002.bin", | |
| "draft_model.response_selector.weight": "pytorch_model-00002-of-00002.bin", | |
| "draft_model.shared_layer.input_layernorm.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.shared_layer.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.shared_layer.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.shared_layer.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.shared_layer.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.shared_layer.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.shared_layer.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.shared_layer.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.shared_layer.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.simulation_head.bias": "pytorch_model-00002-of-00002.bin", | |
| "draft_model.simulation_head.weight": "pytorch_model-00002-of-00002.bin", | |
| "draft_model.stimuli_vector": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.input_layernorm.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "draft_model.unique_layer.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "embed_tokens.weight": "pytorch_model-00001-of-00002.bin", | |
| "emotion_vector": "pytorch_model-00001-of-00002.bin", | |
| "lm_head.weight": "pytorch_model-00001-of-00002.bin", | |
| "memory_keys": "pytorch_model-00001-of-00002.bin", | |
| "memory_values": "pytorch_model-00001-of-00002.bin", | |
| "norm.bias": "pytorch_model-00001-of-00002.bin", | |
| "norm.weight": "pytorch_model-00001-of-00002.bin", | |
| "prediction_head.bias": "pytorch_model-00001-of-00002.bin", | |
| "prediction_head.weight": "pytorch_model-00001-of-00002.bin", | |
| "response_selector.bias": "pytorch_model-00001-of-00002.bin", | |
| "response_selector.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.input_layernorm.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "shared_layer.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "simulation_head.bias": "pytorch_model-00001-of-00002.bin", | |
| "simulation_head.weight": "pytorch_model-00001-of-00002.bin", | |
| "stimuli_vector": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.input_layernorm.weight": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin", | |
| "unique_layer.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin" | |
| } | |
| } | |