XuehangCang commited on
Commit
73c5e25
·
verified ·
1 Parent(s): e4ddac0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -21
README.md CHANGED
@@ -18,34 +18,57 @@ language:
18
  - zh
19
  ---
20
 
21
- # Model Trained Using AutoTrain
22
 
23
- This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
24
 
25
- # Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  ```python
 
 
 
 
 
 
 
 
28
 
29
- from transformers import AutoModelForCausalLM, AutoTokenizer
 
30
 
31
- model_path = "PATH_TO_THIS_REPO"
32
 
33
- tokenizer = AutoTokenizer.from_pretrained(model_path)
34
- model = AutoModelForCausalLM.from_pretrained(
35
- model_path,
36
- device_map="auto",
37
- torch_dtype='auto'
38
- ).eval()
39
 
40
- # Prompt content: "hi"
41
- messages = [
42
- {"role": "user", "content": "hi"}
43
- ]
44
 
45
- input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
46
- output_ids = model.generate(input_ids.to('cuda'))
47
- response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
 
 
 
 
 
 
 
 
 
48
 
49
- # Model response: "Hello! How can I assist you today?"
50
- print(response)
51
- ```
 
18
  - zh
19
  ---
20
 
21
+ # Model Card for Erotic-literature Text Generation Model
22
 
23
+ ## Overview
24
 
25
+ This model is a fine-tuned version of the `meta-llama/Llama-3.1-8B` using the PEFT (Parameter Efficient Fine-Tuning) approach on a specialized dataset for generating text in the genre of erotic literature. It has been designed to understand and generate text in Chinese related to this specific domain, making it a useful tool for tasks involving creative writing, story generation, or other applications within this genre.
26
+
27
+ ## Model Details
28
+
29
+ - **Base Model**: `meta-llama/Llama-3.1-8B`
30
+ - **Model Type**: Text Generation
31
+ - **Language**: Chinese (zh)
32
+ - **Fine-Tuning**: The model has been fine-tuned using the `XuehangCang/Erotic-literature-split` dataset which specifically focuses on erotic literature. This allows the model to generate relevant and cohesive content within this genre.
33
+
34
+ ## Usage
35
+
36
+ ### Example
37
+
38
+ This model can be utilized through the Transformers library. Below is a basic example of how to use this model for text generation:
39
 
40
  ```python
41
+ from transformers import pipeline
42
+
43
+ # Load the model
44
+ generator = pipeline('text-generation', model='your_username/Erotic-literature-model')
45
+
46
+ # Generate text
47
+ prompt = "在星光熠熠的夜晚,她独自在海边徘徊,思绪纷飞。"
48
+ output = generator(prompt, max_length=100, num_return_sequences=1)
49
 
50
+ print(output[0]['generated_text'])
51
+ ```
52
 
53
+ ### Applications
54
 
55
+ - **Creative Writing**: Writers looking to explore themes within the erotic literature genre can leverage this model for inspiration.
56
+ - **Research**: Researchers studying linguistic patterns or narrative structures in adult literature might find this model useful.
57
+ - **Entertainment**: Can be used to generate content for storytelling games or interactive fiction.
 
 
 
58
 
59
+ ## Ethical Considerations
 
 
 
60
 
61
+ - **Content Sensitivity**: As this model generates content related to erotic literature, users should be aware of the mature nature of the outputs. Appropriately manage the generated content to ensure it meets relevant ethical and legal standards.
62
+ - **Bias and Representation**: While trained exclusively on a specific genre, be cautious of any biases that may arise from the dataset used. Ensure inclusivity and sensitive handling of different characters and narratives.
63
+
64
+ ## License
65
+
66
+ The model is licensed under a different license type, which may have specific restrictions or requirements. Users should review the license associated with `meta-llama/Llama-3.1-8B` and ensure compliance with its terms when using this fine-tuned model.
67
+
68
+ ## Contact
69
+
70
+ For questions or feedback related to the model, feel free to contact the contributor or host organization associated with `XuehangCang/Erotic-literature-split` dataset.
71
+
72
+ ---
73
 
74
+ This model card provides a comprehensive overview of the intended use and capabilities of the erotic literature text generation model. Users are encouraged to explore its features while being mindful of ethical considerations and licensing terms.