Text Generation
Transformers
Safetensors
English
fabric
efficient
0.7b
causal-lm
chunked-memory
conversational
custom_code
Instructions to use FabricAI/Fabric1.5-0.7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FabricAI/Fabric1.5-0.7B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FabricAI/Fabric1.5-0.7B-Instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FabricAI/Fabric1.5-0.7B-Instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FabricAI/Fabric1.5-0.7B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FabricAI/Fabric1.5-0.7B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FabricAI/Fabric1.5-0.7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FabricAI/Fabric1.5-0.7B-Instruct
- SGLang
How to use FabricAI/Fabric1.5-0.7B-Instruct 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 "FabricAI/Fabric1.5-0.7B-Instruct" \ --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": "FabricAI/Fabric1.5-0.7B-Instruct", "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 "FabricAI/Fabric1.5-0.7B-Instruct" \ --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": "FabricAI/Fabric1.5-0.7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FabricAI/Fabric1.5-0.7B-Instruct with Docker Model Runner:
docker model run hf.co/FabricAI/Fabric1.5-0.7B-Instruct
Download fabric_config.json from FabricAI/Fabric1.5-0.7B-Instruct: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/FabricAI/Fabric1.5-0.7B-Instruct/resolve/main/fabric_config.json
- Command line
-
hf download hf://FabricAI/Fabric1.5-0.7B-Instruct/fabric_config.json
-
curl -L -o fabric_config.json https://huggingface.co/FabricAI/Fabric1.5-0.7B-Instruct/resolve/main/fabric_config.json
1.17 kB
| { | |
| "activation_checkpointing": true, | |
| "architecture": "fabric", | |
| "attention_backend": "auto", | |
| "attention_chunk_size": 1024, | |
| "checkpoint_dtype": "float16", | |
| "checkpoint_note": "Model-only Fabric complete checkpoint; optimizer state is excluded.", | |
| "checkpoint_sha256": "a8d12a687fe5eaa05b601ab2803ca2c14b9cc2c14d754110ca4569b061af2bf1", | |
| "checkpoint_size_gib": 1.383114, | |
| "chunked_cross_entropy": true, | |
| "continued_pretraining_tokens": 5000134656, | |
| "cumulative_pretraining_tokens": 23000514560, | |
| "export_kind": "model_only_inference_fp16", | |
| "head_dim": 64, | |
| "hidden_size": 1536, | |
| "intermediate_size": 4096, | |
| "license": "fabric-ai-open-1.0", | |
| "local_attention_window": 2048, | |
| "loss_chunk_size": 1024, | |
| "memory_chunk_size": 512, | |
| "model_name": "Fabric1.5-0.7B-Instruct", | |
| "num_kv_heads": 6, | |
| "num_layers": 24, | |
| "num_parameters": 742528520, | |
| "num_query_heads": 24, | |
| "original_pretraining_tokens": 18000379904, | |
| "posttraining_supervised_tokens": 318879711, | |
| "rms_norm_eps": 1e-06, | |
| "rope_theta": 1000000.0, | |
| "sequence_length": 32768, | |
| "summaries_per_chunk": 4, | |
| "tie_word_embeddings": true, | |
| "torch_dtype": "float16", | |
| "vocab_size": 65536 | |
| } | |