gamedevelop commited on
Commit
b605310
·
verified ·
1 Parent(s): 7752b17

Update chatcode/README.md

Browse files
Files changed (1) hide show
  1. chatcode/README.md +61 -7
chatcode/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # PocketVision Chat & Code — version 2 preparation
2
 
3
  This version accepts text and produces text. It focuses on ordinary conversation,
4
- explaining code, generating functions, and debugging. There is no image input,
5
  vision encoder, image processor, or ChartQA training in the new pipeline.
6
 
7
  **Status:** source and training recipe published privately at
@@ -19,19 +19,27 @@ It does not silently run the old model under the new name.
19
  This is an instruction-tuned text model; its model card includes chat and coding evaluations.
20
  - Data: [HuggingFaceTB/smoltalk](https://huggingface.co/datasets/HuggingFaceTB/smoltalk),
21
  pinned to `5feaf2fd3ffca7c237fc38d1861bc30365d48ffa`.
22
- - Pilot: 12,000 `self-oss-instruct` programming examples and 8,000
23
- `smol-magpie-ultra` conversation examples. The coding source primarily covers
 
24
  Python. JavaScript and other languages need additional sources and tests.
25
  - Attribution for the coding subset: BigCode,
26
  [self-oss-instruct-sc2-exec-filter-50k](https://huggingface.co/datasets/bigcode/self-oss-instruct-sc2-exec-filter-50k),
27
  Open Data Commons Attribution License (ODC-BY). The source describes its responses
28
  as execution-validated; this project does not rerun or independently certify them.
29
- Smol-Magpie-Ultra is Apache-2.0. Dependency and underlying source terms still apply.
30
- - Separate validation and test sets: 128 examples from each source per split.
 
31
  All three derived splits come from the sources' official **training** split.
32
  Official test data is unused. Identical normalized opening questions are grouped
33
  and deduplicated globally. This does not establish novel or semantically disjoint
34
  data relative to the pretrained base.
 
 
 
 
 
 
35
  - Examples longer than 2,048 tokens are skipped, preserving complete code/answers.
36
  Only assistant answer and end-of-turn tokens contribute to loss.
37
  - One epoch of 4-bit NF4 QLoRA, rank 16, all linear projections, learning rate
@@ -44,6 +52,46 @@ Use the existing environment and run `python app.py`. With no CUDA GPU, it displ
44
  the text-only interface with sending disabled. No new model weights are fetched.
45
  The original visual UI is preserved as `vision_app.py` for reproducibility.
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  ## Train on a remote Linux GPU
48
 
49
  Use a Colab GPU runtime or a Hugging Face Job. A 24 GB GPU is a reasonable starting
@@ -94,6 +142,12 @@ The source bundle does **not** include a sandboxed code-execution evaluator;
94
  never automatically execute arbitrary training data or generated programs on a
95
  machine with credentials. Use an isolated evaluation environment.
96
 
 
 
 
 
 
 
97
  Publish a tested candidate to a new private repository or a distinct version branch;
98
  the old vision adapter must not be relabeled as a chat/code model. Preserve the
99
  base revision and dataset attribution. No quality improvement is claimed yet.
@@ -107,7 +161,7 @@ environment; this ordinary GPU app is not yet a verified ZeroGPU deployment.
107
 
108
  ## Package
109
 
110
- `python -m chatcode.package` creates `dist/pocketvision-chat-code-source.zip`.
111
  It includes only the active app, text pipeline, configuration, documentation,
112
  and licenses. It excludes old weights, datasets, caches, environments, and credentials.
113
  Project source remains GPL-3.0-only; original Qwen weights remain Apache-2.0.
 
1
+ # PocketVision Chat, Code & Writing — source preparation
2
 
3
  This version accepts text and produces text. It focuses on ordinary conversation,
4
+ explaining code, generating functions, debugging, and source-based article writing. There is no image input,
5
  vision encoder, image processor, or ChartQA training in the new pipeline.
6
 
7
  **Status:** source and training recipe published privately at
 
19
  This is an instruction-tuned text model; its model card includes chat and coding evaluations.
20
  - Data: [HuggingFaceTB/smoltalk](https://huggingface.co/datasets/HuggingFaceTB/smoltalk),
21
  pinned to `5feaf2fd3ffca7c237fc38d1861bc30365d48ffa`.
22
+ - Planned Hub mix: 10,000 `self-oss-instruct` programming examples, 6,000
23
+ `smol-magpie-ultra` conversation examples, 2,000 `smol-rewrite` writing/editing
24
+ examples, and 2,000 `smol-summarize` source summarization examples. The coding source primarily covers
25
  Python. JavaScript and other languages need additional sources and tests.
26
  - Attribution for the coding subset: BigCode,
27
  [self-oss-instruct-sc2-exec-filter-50k](https://huggingface.co/datasets/bigcode/self-oss-instruct-sc2-exec-filter-50k),
28
  Open Data Commons Attribution License (ODC-BY). The source describes its responses
29
  as execution-validated; this project does not rerun or independently certify them.
30
+ Smol-Magpie-Ultra, Smol-rewrite, and Smol-summarize are Apache-2.0.
31
+ Dependency and underlying source terms still apply.
32
+ - Separate Hub validation and test sets: 128 examples from each of four sources per split (512 each).
33
  All three derived splits come from the sources' official **training** split.
34
  Official test data is unused. Identical normalized opening questions are grouped
35
  and deduplicated globally. This does not establish novel or semantically disjoint
36
  data relative to the pretrained base.
37
+ - An additional 20 project-authored examples teach the article JSON and source-review
38
+ tasks: 12 training, 4 validation, 4 test. They use **fictional practice topics and
39
+ reserved example.org URLs**, not real references. Both tasks for a source packet
40
+ stay in the same split, enforced again when the trainer loads data. These small
41
+ examples teach format; they are not a large factual corpus or evidence of quality.
42
+ The final default counts are 20,012 train and 516 each validation/test.
43
  - Examples longer than 2,048 tokens are skipped, preserving complete code/answers.
44
  Only assistant answer and end-of-turn tokens contribute to loss.
45
  - One epoch of 4-bit NF4 QLoRA, rank 16, all linear projections, learning rate
 
52
  the text-only interface with sending disabled. No new model weights are fetched.
53
  The original visual UI is preserved as `vision_app.py` for reproducibility.
54
 
55
+ ## Article writing and Wikipedia preparation
56
+
57
+ The **Articles & research** tab has two tasks. Reference article produces a short,
58
+ neutral article with a lead, sections, references and research gaps. Wikipedia
59
+ outline and source review produces section questions and source-review tasks for
60
+ a human editor, without article prose. Paste titles, URLs and relevant excerpts;
61
+ the app does not fetch websites or search the web.
62
+
63
+ The model returns structured text with source IDs. Application code rejects unknown
64
+ or absent IDs and renders URLs only from the supplied metadata. Incomplete JSON,
65
+ uncited paragraphs and model-added raw citation markup are rejected. This is **not
66
+ a factual-entailment or source-reliability checker**. A valid ID can still point to
67
+ an excerpt that does not support the claim, so every draft requires human review.
68
+ No articles are uploaded to Wikipedia by this app.
69
+
70
+ English Wikipedia's [current guideline](https://en.wikipedia.org/wiki/Wikipedia:Writing_articles_with_large_language_models)
71
+ prohibits LLM-generated/re-written article prose, with limited copyediting and
72
+ translation exceptions. The reference-article task is for other writing contexts;
73
+ use the planning task for Wikipedia assistance.
74
+
75
+ The [Wikimedia Wikipedia dataset](https://huggingface.co/datasets/wikimedia/wikipedia)
76
+ contains cleaned article text with references removed. It is not in the default
77
+ mix: its raw text is not a ready-made source-grounded instruction dataset. Any later
78
+ use needs article-level provenance and the corpus's CC-BY-SA/GFDL terms recorded.
79
+ Wikipedia articles should not themselves be cited as evidence for new Wikipedia
80
+ article prose; consult their original reliable sources.
81
+
82
+ ## Colab notebook
83
+
84
+ [cloud_training.ipynb](cloud_training.ipynb) is a cloud training walkthrough.
85
+ Upload it to Colab, select a free GPU if available, add your own existing read token
86
+ in Colab Secrets, and follow its setup. It downloads an immutable snapshot of source
87
+ files and keeps checkpoints in your chosen persistent Drive folder.
88
+
89
+ The saved notebook was structurally checked, its Python cells compiled, and all
90
+ cells executed **only with `DRY_RUN=True`**. `nbformat` and a Colab GPU runtime are
91
+ not available in this local environment; a full cloud run remains unverified.
92
+ Set `DRY_RUN=False` for cloud setup and separately enable `RUN_TRAINING` to train.
93
+ No subscription, GPU job or model publication is started by this preparation.
94
+
95
  ## Train on a remote Linux GPU
96
 
97
  Use a Colab GPU runtime or a Hugging Face Job. A 24 GB GPU is a reasonable starting
 
142
  never automatically execute arbitrary training data or generated programs on a
143
  machine with credentials. Use an isolated evaluation environment.
144
 
145
+ `python -m chatcode.evaluate_articles --adapter /path/to/adapter --output /persistent/article-evaluation.json`
146
+ compares base and adapter formatting/citation-ID acceptance on the four held-out
147
+ fictional behavior cases. It is cloud-GPU only and retains generated outputs for
148
+ human review. Its acceptance rate is not factual accuracy, article quality, or
149
+ Wikipedia suitability. Also evaluate real source packets and chat/code regressions.
150
+
151
  Publish a tested candidate to a new private repository or a distinct version branch;
152
  the old vision adapter must not be relabeled as a chat/code model. Preserve the
153
  base revision and dataset attribution. No quality improvement is claimed yet.
 
161
 
162
  ## Package
163
 
164
+ `python -m chatcode.package` creates `dist/pocketvision-chat-code-writing-source.zip`.
165
  It includes only the active app, text pipeline, configuration, documentation,
166
  and licenses. It excludes old weights, datasets, caches, environments, and credentials.
167
  Project source remains GPL-3.0-only; original Qwen weights remain Apache-2.0.