theoracle commited on
Commit
624e3e1
1 Parent(s): 769cfa4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -23
README.md CHANGED
@@ -1,29 +1,36 @@
1
  ---
 
2
  tags:
 
 
 
3
  - autotrain
4
- - text-generation-inference
5
- - text-generation
6
- - peft
7
  library_name: transformers
8
- widget:
9
- - messages:
10
- - role: user
11
- content: What is your favorite condiment?
12
  license: other
13
  ---
14
 
15
- # Model Trained Using AutoTrain
16
 
17
- This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
18
 
19
- # Usage
20
 
21
- ```python
 
 
 
22
 
23
- from transformers import AutoModelForCausalLM, AutoTokenizer
 
 
24
 
25
- model_path = "PATH_TO_THIS_REPO"
 
26
 
 
27
  tokenizer = AutoTokenizer.from_pretrained(model_path)
28
  model = AutoModelForCausalLM.from_pretrained(
29
  model_path,
@@ -31,15 +38,36 @@ model = AutoModelForCausalLM.from_pretrained(
31
  torch_dtype='auto'
32
  ).eval()
33
 
34
- # Prompt content: "hi"
35
- messages = [
36
- {"role": "user", "content": "hi"}
37
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
- input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
40
- output_ids = model.generate(input_ids.to('cuda'))
41
- response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
42
 
43
- # Model response: "Hello! How can I assist you today?"
44
- print(response)
45
- ```
 
1
  ---
2
+ title: Gemma Italian Camoscio Language Model
3
  tags:
4
+ - italian-language-generation
5
+ - camoscio-dataset
6
+ - gemma-2b
7
  - autotrain
8
+ datasets:
9
+ - camoscio
 
10
  library_name: transformers
11
+ model: theoracle/gemma_italian_camoscio
 
 
 
12
  license: other
13
  ---
14
 
15
+ ## Overview
16
 
17
+ `theoracle/gemma_italian_camoscio` is a cutting-edge model specifically designed for Italian language generation. Leveraging the comprehensive Camoscio dataset, this model enhances the Gemma 2B architecture's capabilities in producing high-quality, contextually accurate Italian text. Developed with AutoTrain, it excels in various Italian text generation tasks, including but not limited to creative writing, article generation, and conversational responses.
18
 
19
+ ## Key Features
20
 
21
+ - **Italian Language Focus**: Tailored to understand and generate Italian text, capturing the language's nuances and complexities.
22
+ - **Camoscio Dataset Training**: Utilizes the rich Camoscio dataset, ensuring the model is well-versed in a wide range of Italian language styles and contexts.
23
+ - **Gemma 2B Architecture**: Built on the powerful Gemma 2B framework, known for its efficiency and effectiveness in language generation tasks.
24
+ - **AutoTrain Enhanced**: Benefits from AutoTrain's optimization, making the model both robust and versatile in handling Italian text generation.
25
 
26
+ ## Usage
27
+
28
+ Here's how to use this model for generating Italian text:
29
 
30
+ ```python
31
+ from transformers import AutoModelForCausalLM, AutoTokenizer
32
 
33
+ model_path = "theoracle/gemma_italian_camoscio"
34
  tokenizer = AutoTokenizer.from_pretrained(model_path)
35
  model = AutoModelForCausalLM.from_pretrained(
36
  model_path,
 
38
  torch_dtype='auto'
39
  ).eval()
40
 
41
+ # Example: Generating Italian text
42
+ prompt = "Inizia la storia con una giornata soleggiata in Sicilia, dove"
43
+
44
+ # Tokenize and generate text
45
+ encoding = tokenizer(prompt, return_tensors='pt', padding=True, truncation=True, max_length=500, add_special_tokens=True)
46
+ input_ids = encoding['input_ids']
47
+ attention_mask = encoding['attention_mask']
48
+
49
+ output_ids = model.generate(
50
+ input_ids.to('cuda'),
51
+ attention_mask=attention_mask.to('cuda'),
52
+ max_new_tokens=300,
53
+ pad_token_id=tokenizer.eos_token_id
54
+ )
55
+
56
+ generated_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
57
+ print(generated_text)
58
+ ```
59
+
60
+ ## Application Scenarios
61
+
62
+ This model is ideal for:
63
+ - Content creators looking to produce Italian-language articles, stories, or scripts.
64
+ - Developers creating conversational AI applications in Italian.
65
+ - Educators and language learners seeking tools for Italian language practice and improvement.
66
+
67
+ ## Training and Technology
68
+
69
+ The `theoracle/gemma_italian_camoscio` model is trained using the AutoTrain platform for optimal performance, ensuring that it is well-suited for a broad spectrum of Italian text generation tasks. The Camoscio dataset provides a solid foundation, offering diverse and extensive coverage of the Italian language, which, combined with the Gemma 2B architecture, enables the model to generate coherent, nuanced, and contextually relevant Italian text.
70
 
71
+ ## License
 
 
72
 
73
+ This model is available under an "other" license, facilitating its use in a wide array of applications. Users are encouraged to review the license terms to ensure compliance with their project requirements and intended use cases.