Add model card and metadata

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +61 -3
README.md CHANGED
@@ -1,3 +1,61 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: transformers
4
+ pipeline_tag: image-text-to-text
5
+ ---
6
+
7
+ # HiVG: Hierarchical SVG Tokenization
8
+
9
+ [**Project Page**](https://hy-hivg.github.io/) | [**Paper**](https://huggingface.co/papers/2604.05072) | [**GitHub**](https://github.com/ximinng/HiVG)
10
+
11
+ HiVG is a hierarchical SVG tokenization framework tailored for autoregressive vector graphics generation. It decomposes raw SVG strings into structured *atomic tokens* and further compresses executable command–parameter groups into geometry-constrained *segment tokens*, substantially improving sequence efficiency while preserving syntactic validity.
12
+
13
+ ## Installation
14
+
15
+ To use this model, install the official implementation from the GitHub repository:
16
+
17
+ ```bash
18
+ git clone https://github.com/ximinng/HiVG.git
19
+ cd HiVG
20
+ pip install -e .
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ You can use the provided inference pipeline for both image-to-SVG and text-to-SVG tasks.
26
+
27
+ ```python
28
+ from hivg_infer import HiSVGInferencePipeline
29
+
30
+ pipeline = HiSVGInferencePipeline(
31
+ model_path="xingxm/HiVG-3B-Base",
32
+ coord_range=234,
33
+ temperature=0.7,
34
+ top_p=0.9,
35
+ max_new_tokens=4096,
36
+ )
37
+
38
+ # Image-to-SVG
39
+ result = pipeline.img2svg("path/to/your_image.png")
40
+ if result["success"]:
41
+ print(result["svg"])
42
+
43
+ # Text-to-SVG
44
+ result = pipeline.text2svg("A minimalist black phone icon with an outline style")
45
+ if result["success"]:
46
+ with open("output.svg", "w") as f:
47
+ f.write(result["svg"])
48
+ ```
49
+
50
+ ## Citation
51
+
52
+ If you find HiVG useful in your research, please consider citing:
53
+
54
+ ```bibtex
55
+ @article{xing2026hivg,
56
+ title={Hierarchical SVG Tokenization: Learning Compact Visual Programs for Scalable Vector Graphics Modeling},
57
+ author={Xing, Ximing and Xue, Ziteng and Li, Zhenxi and Liang, Weicong evangelist, Wang, Linqing and Yang, Zhantao and Hang, Tiankai and Yin, Zijin and Lu, Qinglin and Wang, Chunyu and Yu, Qian},
58
+ journal={arXiv preprint arXiv:2604.05072},
59
+ year={2026}
60
+ }
61
+ ```