pranavbalaji-19 commited on
Commit
d6771e8
·
verified ·
1 Parent(s): 5a4b89c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -46
README.md CHANGED
@@ -2,7 +2,7 @@
2
  language:
3
  - en
4
  base_model:
5
- - TinyLlama/TinyLlama-1.1B-Chat-v1.0
6
  pipeline_tag: text-generation
7
  library_name: transformers
8
  ---
@@ -83,48 +83,3 @@ there is a unique professional skill that builds with each challenge..."
83
  ```
84
 
85
  **Supporting your supporters is the smartest business decision you'll make this year.**
86
-
87
- ---
88
-
89
- Guide to create your own model just using prompt:
90
-
91
- ```python
92
- from transformers import AutoTokenizer, AutoModelForCausalLM
93
- from huggingface_hub import login, HfApi
94
-
95
- def authenticate_with_hub(token):
96
- """Authenticate with Hugging Face using your token"""
97
- login(token=token)
98
- print("Successfully logged in!")
99
-
100
- def push_model_to_hub(model_id, model, tokenizer, commit_message="Update model"):
101
- """Push model and tokenizer to Hugging Face Hub"""
102
- model.push_to_hub(model_id, commit_message=commit_message)
103
- tokenizer.push_to_hub(model_id, commit_message=commit_message)
104
- print(f"Model pushed to {model_id}")
105
-
106
- def set_model_with_prompt(base_model_id, system_prompt):
107
- """Load model and prepare it with your system prompt"""
108
- tokenizer = AutoTokenizer.from_pretrained(base_model_id)
109
- model = AutoModelForCausalLM.from_pretrained(base_model_id)
110
- tokenizer.init_kwargs["chat_template"] = system_prompt
111
- print("Model loaded successfully")
112
-
113
- return model, tokenizer
114
-
115
- def main():
116
- # Replace with your information
117
- HF_TOKEN = "YOUR_HUGGINGFACE_ACCESS_TOKEN"
118
- YOUR_MODEL_ID = "<your_username>/<your_model_name>"
119
- BASE_MODEL_ID = "<base_model_username>/<base_model_name>"
120
- SYSTEM_PROMPT = """ENTER SYSTEM PROMPT HERE"""
121
-
122
- authenticate_with_hub(HF_TOKEN)
123
- model, tokenizer = set_model_with_prompt(BASE_MODEL_ID, SYSTEM_PROMPT)
124
- push_model_to_hub(YOUR_MODEL_ID, model, tokenizer, "Update with custom prompt template")
125
-
126
- print("Process completed successfully!")
127
-
128
- if __name__ == "__main__":
129
- main()
130
- ```
 
2
  language:
3
  - en
4
  base_model:
5
+ - google/gemma-3-1b-it
6
  pipeline_tag: text-generation
7
  library_name: transformers
8
  ---
 
83
  ```
84
 
85
  **Supporting your supporters is the smartest business decision you'll make this year.**