Text Generation
Transformers
Safetensors
Chinese
English
barbet
sft
custom-code
downstream-text-backbone
conversational
custom_code
Instructions to use OpenFormosa/barbet-1b-structured-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenFormosa/barbet-1b-structured-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenFormosa/barbet-1b-structured-sft", 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("OpenFormosa/barbet-1b-structured-sft", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenFormosa/barbet-1b-structured-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenFormosa/barbet-1b-structured-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenFormosa/barbet-1b-structured-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OpenFormosa/barbet-1b-structured-sft
- SGLang
How to use OpenFormosa/barbet-1b-structured-sft 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 "OpenFormosa/barbet-1b-structured-sft" \ --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": "OpenFormosa/barbet-1b-structured-sft", "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 "OpenFormosa/barbet-1b-structured-sft" \ --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": "OpenFormosa/barbet-1b-structured-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OpenFormosa/barbet-1b-structured-sft with Docker Model Runner:
docker model run hf.co/OpenFormosa/barbet-1b-structured-sft
Download package_validation.json from OpenFormosa/barbet-1b-structured-sft: direct link, hf CLI and curl.
- Browser
- Download file 594 Bytes
-
https://huggingface.co/OpenFormosa/barbet-1b-structured-sft/resolve/main/package_validation.json
- Command line
-
hf download hf://OpenFormosa/barbet-1b-structured-sft/package_validation.json
-
curl -L -o package_validation.json https://huggingface.co/OpenFormosa/barbet-1b-structured-sft/resolve/main/package_validation.json
594 Bytes
| { | |
| "step": 7657, | |
| "scope": "full_epoch_export", | |
| "tensors_checked": 391, | |
| "stored_parameters": 1118799096, | |
| "dtype_census": { | |
| "torch.bfloat16": 1118798760, | |
| "torch.float32": 336 | |
| }, | |
| "all_weights_match_cast_training_checkpoint": true, | |
| "all_weights_finite": true, | |
| "cpu_inference_finite": true, | |
| "cpu_cache_present": true, | |
| "cuda_initialized": false, | |
| "cuda_visible_devices": "", | |
| "model_sha256": "ea16e76ea8539ee9ad307ef4e202a94a2f86a96ccdbf22b2c34b95be0523895d", | |
| "tokenizer_sha256": "f84754e42cc4b08d5573a6b7306635e86ed04fff68ee707662d76d7044917176", | |
| "passed": true | |
| } | |