Instructions to use NaughtyDog97/DiagramFormalizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NaughtyDog97/DiagramFormalizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NaughtyDog97/DiagramFormalizer", 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("NaughtyDog97/DiagramFormalizer", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NaughtyDog97/DiagramFormalizer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NaughtyDog97/DiagramFormalizer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NaughtyDog97/DiagramFormalizer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NaughtyDog97/DiagramFormalizer
- SGLang
How to use NaughtyDog97/DiagramFormalizer 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 "NaughtyDog97/DiagramFormalizer" \ --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": "NaughtyDog97/DiagramFormalizer", "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 "NaughtyDog97/DiagramFormalizer" \ --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": "NaughtyDog97/DiagramFormalizer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NaughtyDog97/DiagramFormalizer with Docker Model Runner:
docker model run hf.co/NaughtyDog97/DiagramFormalizer
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# 基于FormalGeo7K的结构识别模型
|
| 2 |
|
| 3 |
## 快速开始
|
|
@@ -106,5 +109,4 @@ print(respones)
|
|
| 106 |
## Performance
|
| 107 |
| | ConsCdlAcc | ConsCdlPerfect | ImgCdlAcc | ImgCdlPerfect | BothPerfect |
|
| 108 |
|-----|----------------|---------------------|---------------|-------------------|------------------|
|
| 109 |
-
| siglip-0.4B-qwen2-0.5B | 90.254 | 72.286 | 92.880 | 84.381 | 65.048 |
|
| 110 |
-
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
# 基于FormalGeo7K的结构识别模型
|
| 5 |
|
| 6 |
## 快速开始
|
|
|
|
| 109 |
## Performance
|
| 110 |
| | ConsCdlAcc | ConsCdlPerfect | ImgCdlAcc | ImgCdlPerfect | BothPerfect |
|
| 111 |
|-----|----------------|---------------------|---------------|-------------------|------------------|
|
| 112 |
+
| siglip-0.4B-qwen2-0.5B | 90.254 | 72.286 | 92.880 | 84.381 | 65.048 |
|
|
|