SadokBarbouche commited on
Commit
ef21fa5
·
verified ·
1 Parent(s): 24c243e

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,32 +1,34 @@
1
- # Planned.AI (planned day) Personalized Trip Planner Model in Tunisia - 4-bit Quantized
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- ## Overview
4
- This repository contains a personalized trip planner tool based on a quantized version of the base model from the MLX library. The tool generates tailored trip itineraries for users based on their preferences and specified destinations. The model leverages a dataset of scraped places from across Tunisia to provide comprehensive and personalized recommendations.
5
-
6
- ## Model Description
7
- The personalized trip planner utilizes a quantized version of the base model from the MLX library. The model has been trained on a dataset comprising various attractions, landmarks, and destinations from Tunisia. By incorporating user preferences and destination inputs, the model generates personalized trip plans that cater to individual interests and requirements.
8
-
9
- ## Usage
10
- To utilize the Personalized Trip Planner tool, follow these steps:
11
-
12
- 1. Install the MLX library:
13
  ```bash
14
  pip install mlx-lm
15
  ```
16
 
17
- 2. Load the base model and tokenizer:
18
  ```python
19
- from mlx_lm import load
20
 
21
- # Load the quantized base model
22
  model, tokenizer = load("SadokBarbouche/planned.AI-gemma-2b-it-quantized")
 
23
  ```
24
-
25
- ## Data Preparation
26
- The model training data comprises scraped information about various attractions and landmarks from Tunisia. The dataset was carefully curated to encompass a diverse range of destinations, ensuring the model's ability to generate comprehensive trip plans.
27
-
28
- ## Evaluation
29
- The performance of the personalized trip planner tool was evaluated based on its ability to generate relevant, coherent, and personalized trip plans tailored to user preferences and specified destinations. Evaluation results demonstrate the effectiveness of the base model in providing valuable recommendations for travelers.
30
-
31
- ## Acknowledgements
32
- We would like to express our gratitude to the contributors of the `google-maps-scraper` tool on GitHub, as well as the developers of the MLX library for their support in model integration and usage.
 
1
+ ---
2
+ license: gemma
3
+ library_name: transformers
4
+ tags:
5
+ - mlx
6
+ widget:
7
+ - messages:
8
+ - role: user
9
+ content: How does the brain work?
10
+ inference:
11
+ parameters:
12
+ max_new_tokens: 200
13
+ extra_gated_heading: Access Gemma on Hugging Face
14
+ extra_gated_prompt: To access Gemma on Hugging Face, you’re required to review and
15
+ agree to Google’s usage license. To do this, please ensure you’re logged-in to Hugging
16
+ Face and click below. Requests are processed immediately.
17
+ extra_gated_button_content: Acknowledge license
18
+ ---
19
+
20
+ # SadokBarbouche/planned.AI-gemma-2b-it-quantized
21
+ This model was converted to MLX format from [`google/gemma-1.1-2b-it`]().
22
+ Refer to the [original model card](https://huggingface.co/google/gemma-1.1-2b-it) for more details on the model.
23
+ ## Use with mlx
24
 
 
 
 
 
 
 
 
 
 
 
25
  ```bash
26
  pip install mlx-lm
27
  ```
28
 
 
29
  ```python
30
+ from mlx_lm import load, generate
31
 
 
32
  model, tokenizer = load("SadokBarbouche/planned.AI-gemma-2b-it-quantized")
33
+ response = generate(model, tokenizer, prompt="hello", verbose=True)
34
  ```
 
 
 
 
 
 
 
 
 
config.json CHANGED
@@ -1,85 +1,86 @@
1
  {
2
- "add_cross_attention": false,
3
- "architectures": [
4
- "GemmaForCausalLM"
5
- ],
 
 
 
 
 
 
 
 
 
 
6
  "attention_bias": false,
7
  "attention_dropout": 0.0,
8
- "bad_words_ids": null,
9
- "begin_suppress_tokens": null,
10
- "bos_token_id": 2,
 
 
 
 
 
 
11
  "chunk_size_feed_forward": 0,
 
 
12
  "cross_attention_hidden_size": null,
13
- "decoder_start_token_id": null,
14
- "diversity_penalty": 0.0,
 
 
15
  "do_sample": false,
16
  "early_stopping": false,
 
 
 
 
 
 
 
 
 
 
17
  "encoder_no_repeat_ngram_size": 0,
18
- "eos_token_id": 1,
19
- "exponential_decay_length_penalty": null,
20
- "finetuning_task": null,
 
21
  "forced_bos_token_id": null,
22
  "forced_eos_token_id": null,
23
- "head_dim": 256,
24
- "hidden_act": "gelu",
25
- "hidden_size": 2048,
 
 
 
 
 
26
  "id2label": {
27
  "0": "LABEL_0",
28
  "1": "LABEL_1"
29
  },
30
- "initializer_range": 0.02,
31
- "intermediate_size": 16384,
32
- "is_decoder": false,
33
- "is_encoder_decoder": false,
34
  "label2id": {
35
  "LABEL_0": 0,
36
  "LABEL_1": 1
37
  },
38
- "length_penalty": 1.0,
39
- "max_length": 20,
40
- "max_position_embeddings": 8192,
41
- "min_length": 0,
42
- "model_type": "gemma",
43
- "no_repeat_ngram_size": 0,
44
- "num_attention_heads": 8,
45
- "num_beam_groups": 1,
46
- "num_beams": 1,
47
- "num_hidden_layers": 18,
48
- "num_key_value_heads": 1,
49
- "num_return_sequences": 1,
50
- "output_attentions": false,
51
- "output_hidden_states": false,
52
- "output_scores": false,
53
- "pad_token_id": 0,
54
  "prefix": null,
 
 
 
 
 
 
55
  "problem_type": null,
56
- "pruned_heads": {},
 
 
57
  "quantization": {
58
  "group_size": 64,
59
  "bits": 4
60
- },
61
- "remove_invalid_values": false,
62
- "repetition_penalty": 1.0,
63
- "return_dict": true,
64
- "return_dict_in_generate": false,
65
- "rms_norm_eps": 1e-06,
66
- "rope_scaling": null,
67
- "rope_theta": 10000.0,
68
- "sep_token_id": null,
69
- "suppress_tokens": null,
70
- "task_specific_params": null,
71
- "temperature": 1.0,
72
- "tf_legacy_loss": false,
73
- "tie_encoder_decoder": false,
74
- "tie_word_embeddings": true,
75
- "tokenizer_class": null,
76
- "top_k": 50,
77
- "top_p": 1.0,
78
- "torch_dtype": "float16",
79
- "torchscript": false,
80
- "transformers_version": "4.38.2",
81
- "typical_p": 1.0,
82
- "use_bfloat16": false,
83
- "use_cache": true,
84
- "vocab_size": 256000
85
  }
 
1
  {
2
+ "vocab_size": 256000,
3
+ "max_position_embeddings": 8192,
4
+ "hidden_size": 2048,
5
+ "intermediate_size": 16384,
6
+ "num_hidden_layers": 18,
7
+ "num_attention_heads": 8,
8
+ "head_dim": 256,
9
+ "num_key_value_heads": 1,
10
+ "hidden_act": "gelu_pytorch_tanh",
11
+ "hidden_activation": "gelu_pytorch_tanh",
12
+ "initializer_range": 0.02,
13
+ "rms_norm_eps": 1e-06,
14
+ "use_cache": true,
15
+ "rope_theta": 10000.0,
16
  "attention_bias": false,
17
  "attention_dropout": 0.0,
18
+ "return_dict": true,
19
+ "output_hidden_states": false,
20
+ "output_attentions": false,
21
+ "torchscript": false,
22
+ "torch_dtype": "bfloat16",
23
+ "use_bfloat16": false,
24
+ "tf_legacy_loss": false,
25
+ "pruned_heads": {},
26
+ "tie_word_embeddings": true,
27
  "chunk_size_feed_forward": 0,
28
+ "is_encoder_decoder": false,
29
+ "is_decoder": false,
30
  "cross_attention_hidden_size": null,
31
+ "add_cross_attention": false,
32
+ "tie_encoder_decoder": false,
33
+ "max_length": 20,
34
+ "min_length": 0,
35
  "do_sample": false,
36
  "early_stopping": false,
37
+ "num_beams": 1,
38
+ "num_beam_groups": 1,
39
+ "diversity_penalty": 0.0,
40
+ "temperature": 1.0,
41
+ "top_k": 50,
42
+ "top_p": 1.0,
43
+ "typical_p": 1.0,
44
+ "repetition_penalty": 1.0,
45
+ "length_penalty": 1.0,
46
+ "no_repeat_ngram_size": 0,
47
  "encoder_no_repeat_ngram_size": 0,
48
+ "bad_words_ids": null,
49
+ "num_return_sequences": 1,
50
+ "output_scores": false,
51
+ "return_dict_in_generate": false,
52
  "forced_bos_token_id": null,
53
  "forced_eos_token_id": null,
54
+ "remove_invalid_values": false,
55
+ "exponential_decay_length_penalty": null,
56
+ "suppress_tokens": null,
57
+ "begin_suppress_tokens": null,
58
+ "architectures": [
59
+ "GemmaForCausalLM"
60
+ ],
61
+ "finetuning_task": null,
62
  "id2label": {
63
  "0": "LABEL_0",
64
  "1": "LABEL_1"
65
  },
 
 
 
 
66
  "label2id": {
67
  "LABEL_0": 0,
68
  "LABEL_1": 1
69
  },
70
+ "tokenizer_class": null,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  "prefix": null,
72
+ "bos_token_id": 2,
73
+ "pad_token_id": 0,
74
+ "eos_token_id": 1,
75
+ "sep_token_id": null,
76
+ "decoder_start_token_id": null,
77
+ "task_specific_params": null,
78
  "problem_type": null,
79
+ "_name_or_path": "/root/.cache/huggingface/hub/models--google--gemma-1.1-2b-it/snapshots/bf4924f313df5166dee1467161e886e55f2eb4d4",
80
+ "transformers_version": "4.39.3",
81
+ "model_type": "gemma",
82
  "quantization": {
83
  "group_size": 64,
84
  "bits": 4
85
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c479437d917adc183d91e75516db16805bb64a7d2cba00b11c6e989ecafb536a
3
- size 2163541275
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:778be7f9278a91ec3bbd3d554fafc1994bc3f85a95f548fa37dd77409d45ecec
3
+ size 2163541283
special_tokens_map.json CHANGED
@@ -18,7 +18,7 @@
18
  "single_word": false
19
  },
20
  "pad_token": {
21
- "content": "<eos>",
22
  "lstrip": false,
23
  "normalized": false,
24
  "rstrip": false,
 
18
  "single_word": false
19
  },
20
  "pad_token": {
21
+ "content": "<pad>",
22
  "lstrip": false,
23
  "normalized": false,
24
  "rstrip": false,
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f30f819ff5b0f4cef2c8a6aafbeb20a13e7dd14409ece0f1e11e1d84bcfd281b
3
- size 17518937
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c15eb04bc5ad609fb26533e8525302c5640a945e5f67f65b7c849900acda7d99
3
+ size 17518497
tokenizer_config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "add_bos_token": true,
3
- "add_eos_token": true,
4
  "added_tokens_decoder": {
5
  "0": {
6
  "content": "<pad>",
@@ -1748,7 +1748,7 @@
1748
  "clean_up_tokenization_spaces": false,
1749
  "eos_token": "<eos>",
1750
  "model_max_length": 1000000000000000019884624838656,
1751
- "pad_token": "<eos>",
1752
  "sp_model_kwargs": {},
1753
  "spaces_between_special_tokens": false,
1754
  "tokenizer_class": "GemmaTokenizer",
 
1
  {
2
  "add_bos_token": true,
3
+ "add_eos_token": false,
4
  "added_tokens_decoder": {
5
  "0": {
6
  "content": "<pad>",
 
1748
  "clean_up_tokenization_spaces": false,
1749
  "eos_token": "<eos>",
1750
  "model_max_length": 1000000000000000019884624838656,
1751
+ "pad_token": "<pad>",
1752
  "sp_model_kwargs": {},
1753
  "spaces_between_special_tokens": false,
1754
  "tokenizer_class": "GemmaTokenizer",