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)# 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
File size: 1,628 Bytes
ea1882d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | {
"activation_checkpointing": true,
"architecture": "fabric",
"architectures": [
"FabricForCausalLM"
],
"attention_backend": "auto",
"attention_chunk_size": 1024,
"auto_map": {
"AutoConfig": "configuration_fabric.FabricConfig",
"AutoModelForCausalLM": "modeling_fabric.FabricForCausalLM"
},
"bos_token_id": 2,
"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,
"eos_token_id": 7,
"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,
"max_position_embeddings": 32768,
"memory_chunk_size": 512,
"model_name": "Fabric1.5-0.7B-Instruct",
"model_type": "fabric",
"num_attention_heads": 24,
"num_hidden_layers": 24,
"num_key_value_heads": 6,
"num_kv_heads": 6,
"num_layers": 24,
"num_parameters": 742528520,
"num_query_heads": 24,
"original_pretraining_tokens": 18000379904,
"pad_token_id": 0,
"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",
"transformers_version": "custom",
"use_cache": false,
"vocab_size": 65536
}
|