Text Generation
Transformers
Safetensors
English
fabric
efficient
0.7b
causal-lm
chunked-memory
custom_code
Instructions to use FabricAI/Fabric1.5-0.7B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FabricAI/Fabric1.5-0.7B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FabricAI/Fabric1.5-0.7B-Base", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FabricAI/Fabric1.5-0.7B-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FabricAI/Fabric1.5-0.7B-Base 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-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FabricAI/Fabric1.5-0.7B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FabricAI/Fabric1.5-0.7B-Base
- SGLang
How to use FabricAI/Fabric1.5-0.7B-Base 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-Base" \ --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": "FabricAI/Fabric1.5-0.7B-Base", "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 "FabricAI/Fabric1.5-0.7B-Base" \ --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": "FabricAI/Fabric1.5-0.7B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FabricAI/Fabric1.5-0.7B-Base with Docker Model Runner:
docker model run hf.co/FabricAI/Fabric1.5-0.7B-Base
| { | |
| "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": "62a50732d1b1f4f94ba3c4c9838b42777f773fe038126cb6307b235bdfc9878a", | |
| "checkpoint_size_gib": 1.383114, | |
| "chunked_cross_entropy": true, | |
| "continued_pretraining_tokens": 5000134656, | |
| "cumulative_pretraining_tokens": 23000514560, | |
| "eos_token_id": 3, | |
| "export_kind": "model_only_inference_fp16", | |
| "head_dim": 64, | |
| "hidden_size": 1536, | |
| "intermediate_size": 4096, | |
| "license": "apache-2.0", | |
| "local_attention_window": 2048, | |
| "loss_chunk_size": 1024, | |
| "max_position_embeddings": 32768, | |
| "memory_chunk_size": 512, | |
| "model_name": "Fabric1.5-0.7B-Base", | |
| "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": 0, | |
| "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 | |
| } | |