danielhanchen commited on
Commit
bdb80a5
·
verified ·
1 Parent(s): 234c605

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +126 -0
README.md ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - unsloth
4
+ base_model:
5
+ - internlm/JanusCoder-8B
6
+ license: apache-2.0
7
+ pipeline_tag: image-text-to-text
8
+ library_name: transformers
9
+ ---
10
+ > [!NOTE]
11
+ > Includes Unsloth **chat template fixes**! <br> For `llama.cpp`, use `--jinja`
12
+ >
13
+
14
+ <div>
15
+ <p style="margin-top: 0;margin-bottom: 0;">
16
+ <em><a href="https://docs.unsloth.ai/basics/unsloth-dynamic-v2.0-gguf">Unsloth Dynamic 2.0</a> achieves superior accuracy & outperforms other leading quants.</em>
17
+ </p>
18
+ <div style="display: flex; gap: 5px; align-items: center; ">
19
+ <a href="https://github.com/unslothai/unsloth/">
20
+ <img src="https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png" width="133">
21
+ </a>
22
+ <a href="https://discord.gg/unsloth">
23
+ <img src="https://github.com/unslothai/unsloth/raw/main/images/Discord%20button.png" width="173">
24
+ </a>
25
+ <a href="https://docs.unsloth.ai/">
26
+ <img src="https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/documentation%20green%20button.png" width="143">
27
+ </a>
28
+ </div>
29
+ </div>
30
+
31
+
32
+ # JanusCoder-8B
33
+
34
+ [💻Github Repo](https://github.com/InternLM/JanusCoder) • [🤗Model Collections](https://huggingface.co/collections/internlm/januscoder) • [📜Technical Report](https://www.arxiv.org/abs/2510.23538)
35
+
36
+ ## Introduction
37
+
38
+ We introduce JanusCoder and JanusCoderV, a suite of open-source foundational models designed to establish a unified visual-programmatic interface for code intelligence.
39
+ This model suite is built upon open-source language models (such as Qwen3-8B and 14B) and multimodal models (such as Qwen2.5-VL and InternVL3.5-8B). The JanusCoder series is trained on JANUSCODE-800K—the largest multimodal code corpus to date, generated by an innovative synthesis toolkit, covering everything from standard charts to complex interactive Web UIs and code-driven animations.
40
+ This enables the models to uniformly handle diverse visual-programmatic tasks, such as generating code from textual instructions, visual inputs, or a combination of both, rather than building specialized models for isolated tasks. JanusCoder excels at flexible content generation (like data visualizations and interactive front-ends) as well as precise, program-driven editing of visual effects and complex animation construction.
41
+
42
+ ## Model Downloads
43
+
44
+ | Model Name | Description | Download |
45
+ | --- | --- | --- |
46
+ | 👉 **JanusCoder-8B** | 8B text model based on Qwen3-8B. | 🤗 [Model](https://huggingface.co/internlm/JanusCoder-8B) |
47
+ | JanusCoder-14B | 14B text model based on Qwen3-14B. | 🤗 [Model](https://huggingface.co/internlm/JanusCoder-14B) |
48
+ | JanusCoderV-7B | 7B multimodal model based on Qwen2.5-VL-7B. | 🤗 [Model](https://huggingface.co/internlm/JanusCoderV-7B) |
49
+ | JanusCoderV-8B | 8B multimodal model based on InternVL3.5-8B. | 🤗 [Model](https://huggingface.co/internlm/JanusCoderV-8B) |
50
+
51
+ ## Performance
52
+
53
+ We evaluate the JanusCoder model on various benchmarks that span code interlligence tasks on multiple PLs:
54
+
55
+ | Model | JanusCoder-8B | Qwen3-8B | Qwen2.5-Coder-7B-Instruct | LLaMA3-8B-Instruct | GPT-4o |
56
+ | --- | --- | --- | --- | --- | --- |
57
+ | PandasPlotBench (Task) | 80 | 74 | 76 | 69 | 85 |
58
+ | ArtifactsBench | 39.6 | 36.5 | 26.0 | 36.5 | 37.9 |
59
+ | DTVBench (Manim) | 9.70 | 6.20 | 8.56 | 4.92 | 10.60 |
60
+ | DTVBench (Wolfram) | 6.07 | 5.18 | 4.04 | 3.15 | 5.97 |
61
+
62
+
63
+ ## Quick Start
64
+
65
+ **Transformers**
66
+
67
+ The following provides demo code illustrating how to generate text using JanusCoder-8B.
68
+
69
+ > Please use transformers >= 4.55.0 to ensure the model works normally.
70
+
71
+ ```python
72
+ from transformers import AutoTokenizer, AutoModelForCausalLM
73
+ import torch
74
+
75
+ model_name = "internlm/JanusCoder-8B"
76
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
77
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto")
78
+
79
+ messages = [
80
+ {
81
+ "role": "user",
82
+ "content": [
83
+ {"type": "text", "text": "Create a line plot that illustrates function y=x."},
84
+ ],
85
+ }
86
+ ]
87
+
88
+ inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device, dtype=torch.bfloat16)
89
+
90
+ generate_ids = model.generate(**inputs, max_new_tokens=32768)
91
+ decoded_output = processor.decode(generate_ids[0, inputs["input_ids"].shape[1] :], skip_special_tokens=True)
92
+ print(decoded_output)
93
+ ```
94
+
95
+ ## Citation
96
+ 🫶 If you are interested in our work or find the repository / checkpoints / benchmark / data helpful, please consider using the following citation format when referencing our papers:
97
+
98
+ ```bibtex
99
+ @article{sun2025januscoder,
100
+ title={JanusCoder: Towards a Foundational Visual-Programmatic Interface for Code Intelligence},
101
+ author={Sun, Qiushi and Gong, Jingyang and Liu, Yang and Chen, Qiaosheng and Li, Lei and Chen, Kai and Guo, Qipeng and Kao, Ben and Yuan, Fei},
102
+ journal={arXiv preprint arXiv:2510.23538},
103
+ year={2025}
104
+ }
105
+
106
+ @article{sun2024survey,
107
+ title={A survey of neural code intelligence: Paradigms, advances and beyond},
108
+ author={Sun, Qiushi and Chen, Zhirui and Xu, Fangzhi and Cheng, Kanzhi and Ma, Chang and Yin, Zhangyue and Wang, Jianing and Han, Chengcheng and Zhu, Renyu and Yuan, Shuai and others},
109
+ journal={arXiv preprint arXiv:2403.14734},
110
+ year={2024}
111
+ }
112
+
113
+ @article{chen2025interactscience,
114
+ title={InteractScience: Programmatic and Visually-Grounded Evaluation of Interactive Scientific Demonstration Code Generation},
115
+ author={Chen, Qiaosheng and Liu, Yang and Li, Lei and Chen, Kai and Guo, Qipeng and Cheng, Gong and Yuan, Fei},
116
+ journal={arXiv preprint arXiv:2510.09724},
117
+ year={2025}
118
+ }
119
+
120
+ @article{sun2025codeevo,
121
+ title={CodeEvo: Interaction-Driven Synthesis of Code-centric Data through Hybrid and Iterative Feedback},
122
+ author={Sun, Qiushi and Gong, Jinyang and Li, Lei and Guo, Qipeng and Yuan, Fei},
123
+ journal={arXiv preprint arXiv:2507.22080},
124
+ year={2025}
125
+ }
126
+ ```