Clemylia commited on
Commit
99f6792
·
verified ·
1 Parent(s): 771ccd8

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers.js
3
+ license: other
4
+ language:
5
+ - fr
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - concept of code
9
+ - Codeur
10
+ - Basique Codeur creatif
11
+ - SLM
12
+ base_model:
13
+ - NaA-IA/Qsana-coder-base
14
+ ---
15
+
16
+
17
+
18
+ # Qsana-coder-base (ONNX)
19
+
20
+
21
+ This is an ONNX version of [NaA-IA/Qsana-coder-base](https://huggingface.co/NaA-IA/Qsana-coder-base). It was automatically converted and uploaded using [this Hugging Face Space](https://huggingface.co/spaces/onnx-community/convert-to-onnx).
22
+
23
+
24
+ ## Usage with Transformers.js
25
+
26
+
27
+ See the pipeline documentation for `text-generation`: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TextGenerationPipeline
28
+
29
+
30
+ ---
31
+
32
+
33
+ # 🤖 Qsana-coder-base : L'Assistant de Pseudo-Code Éducatif
34
+
35
+ ![Qsana](http://www.image-heberg.fr/files/17637511953035484323.png)
36
+
37
+ ## 🌟 Mission & Positionnement
38
+
39
+ **Qsana-coder-base** est un *Small Language Model* (SLM) conçu pour la **créativité conceptuelle** autour des bases du codage (Python, pseudocode). Il ne vise **PAS** à produire du code exécutable en production, mais à générer des **fragments de logique codée** pour des contextes éducatifs et de prototypage rapide.
40
+
41
+ > 💡 **Le but n'est pas la validité syntaxique à 100%, mais la stimulation de la pensée logique et la visualisation des concepts de codage (variables, boucles, conditions) pour les débutants.**
42
+
43
+ ## 🎯 Cas d'Usage Principaux
44
+
45
+ | Emojis | Cas d'Usage | Description |
46
+ | :--- | :--- | :--- |
47
+ | 🧑‍🏫 | **Outil Pédagogique** | Générer des exemples de code courts et thématiques pour les jeunes apprenants (enfants, collégiens) qui illustrent la *logique* d'une fonction, même si la syntaxe est "créative". |
48
+ | 🧪 | **Prototypage Conceptuel** | Pour les développeurs qui veulent rapidement coucher sur le papier la *structure* d'une idée sans se soucier des détails syntaxiques stricts. |
49
+ | ✍️ | **Génération de Pseudo-Code** | Produire des fragments de code qui se rapprochent du langage naturel et qui sont faciles à expliquer sans nécessiter un environnement de développement complet. |
50
+
51
+ ## ⚙️ Détails Techniques
52
+
53
+ * **Modèle de Base :** `lam-4-zero-f` (51M, Fine-Tuned)
54
+ * **Langage Principal :** Français / Pseudo-Code Python
55
+ * **Précision Syntaxique :** **Intentionalité Créative (Non Rigide)**. Les erreurs de syntaxe font partie du comportement attendu pour illustrer le concept de "code prototype".
56
+ * **Poids / Efficacité :** Optimisé pour une exécution locale rapide (SLM).
57
+
58
+ ## 🛑 Limitations et Comportement Attendu
59
+
60
+ Veuillez noter le comportement intentionnel suivant de **Qsana-coder-base** :
61
+
62
+ 1. **Non-Exécutable :** Le code généré **n'est pas destiné à être copié/collé et exécuté** sans correction.
63
+ 2. **Créativité Lexicale :** Le modèle mélange parfois les opérateurs (`<=`, `!=`) et les mots-clés (`continue`, `print`) d'une manière qui n'est pas standard en Python. **Ceci est le résultat du *fine-tuning* visant la créativité.**
64
+ 3. **Utilisation du Chat Template :** Pour obtenir les résultats les plus cohérents, il est **fortement recommandé** d'utiliser le Chat Template fourni.
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "[PAD]": 50257
3
+ }
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "_name_or_path": "NaA-IA/Qsana-coder-base",
4
+ "activation_function": "gelu_new",
5
+ "architectures": [
6
+ "GPT2LMHeadModel"
7
+ ],
8
+ "attn_pdrop": 0.1,
9
+ "bos_token_id": 50256,
10
+ "dtype": "float32",
11
+ "embd_pdrop": 0.1,
12
+ "eos_token_id": 50256,
13
+ "initializer_range": 0.02,
14
+ "layer_norm_epsilon": 1e-05,
15
+ "model_type": "gpt2",
16
+ "n_embd": 512,
17
+ "n_head": 8,
18
+ "n_inner": null,
19
+ "n_layer": 8,
20
+ "n_positions": 128,
21
+ "pad_token_id": 50257,
22
+ "reorder_and_upcast_attn": false,
23
+ "resid_pdrop": 0.1,
24
+ "scale_attn_by_inverse_layer_idx": false,
25
+ "scale_attn_weights": true,
26
+ "summary_activation": null,
27
+ "summary_first_dropout": 0.1,
28
+ "summary_proj_to_labels": true,
29
+ "summary_type": "cls_index",
30
+ "summary_use_proj": true,
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.49.0",
33
+ "use_cache": true,
34
+ "vocab_size": 50258
35
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 50256,
4
+ "eos_token_id": [
5
+ 50256
6
+ ],
7
+ "pad_token_id": 50257,
8
+ "transformers_version": "4.49.0"
9
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa355ca084d8940198e8db78ca77247de56f98651450486f7d9dadede60d1300
3
+ size 204300051
onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc8819f30f71433c3b222daddf9760e771e9095fa1a8e8ea5621cfc05d5a983b
3
+ size 204300070
onnx/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57e8fc701837895077f13337760116990820a89ae7476bb86f8900d075588971
3
+ size 102268734
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ed38ba0b636417c115a15ab56a6c10438f2c98083de3d644f516edbd93b27a6
3
+ size 154386872
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc8819f30f71433c3b222daddf9760e771e9095fa1a8e8ea5621cfc05d5a983b
3
+ size 204300070
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c48c8d2e2da07b532327294a67639183be489cd7145439756ed473ad7191c774
3
+ size 102268753
onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ed38ba0b636417c115a15ab56a6c10438f2c98083de3d644f516edbd93b27a6
3
+ size 154386872
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c27daf1c2d0db82e76612248ca764c52a0c7471fa834958bbc7b0193afb15879
3
+ size 154386888
quantize_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "modes": [
3
+ "fp16",
4
+ "q8",
5
+ "int8",
6
+ "uint8",
7
+ "q4",
8
+ "q4f16",
9
+ "bnb4"
10
+ ],
11
+ "per_channel": false,
12
+ "reduce_range": false,
13
+ "block_size": null,
14
+ "is_symmetric": true,
15
+ "accuracy_level": null,
16
+ "quant_type": 1,
17
+ "op_block_list": null
18
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<|endoftext|>",
25
+ "lstrip": false,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "50256": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "50257": {
13
+ "content": "[PAD]",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ }
20
+ },
21
+ "bos_token": "<|endoftext|>",
22
+ "chat_template": "{%- for message in messages -%}\n {{ '### Instruction:\\n' + message.content + '\\n\\n' }}\n{%- endfor -%}\n{{ '### Response:\\n' }}",
23
+ "clean_up_tokenization_spaces": false,
24
+ "eos_token": "<|endoftext|>",
25
+ "extra_special_tokens": {},
26
+ "max_length": 128,
27
+ "model_max_length": 1024,
28
+ "pad_to_multiple_of": null,
29
+ "pad_token": "[PAD]",
30
+ "pad_token_type_id": 0,
31
+ "padding_side": "right",
32
+ "stride": 0,
33
+ "tokenizer_class": "GPT2Tokenizer",
34
+ "truncation_side": "right",
35
+ "truncation_strategy": "longest_first",
36
+ "unk_token": "<|endoftext|>"
37
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff