harpertoken commited on
Commit
18eb0ba
·
verified ·
1 Parent(s): 07fca43

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +22 -88
README.md CHANGED
@@ -1,108 +1,42 @@
1
  ---
2
  license: mit
3
- language:
4
- - en
5
- base_model:
6
- - gpt2
 
 
7
  tags:
8
- - text-generation-inference
9
- - conversational-ai
10
  - gpt2
11
- metrics:
12
- - perplexity
13
- - bleu
14
- - f1
15
- library_name: transformers
16
  ---
17
 
18
- > **Renamed:** previously `harpertoken/harpertokenConvFT`. The old ID still redirects.
19
-
20
- # HarpertokenConvFT
21
 
22
- ## Model Details
23
- - **Model Name**: HarpertokenConvFT
24
- - **Base Model**: gpt2
25
- - **Model Type**: GPT-2-based conversational AI model
26
- - **Max Sequence Length**: 1024 tokens
27
 
28
- ## Intended Use
29
- Generates human-like responses for chatbots, virtual assistants, and dialogue systems.
30
 
31
- ## Training Data
32
- The model was fine-tuned on the DailyDialog dataset, featuring:
33
- - **Training Examples**: 11,118
34
- - **Validation Examples**: 1,000
35
- - **Test Examples**: 1,000
36
 
37
- ## Dataset Characteristics
38
- - **Description**: A high-quality, multi-turn dialogue dataset covering everyday topics.
39
- - **Features**: Includes dialogues, communication acts, and emotion annotations.
40
- - **Citation**:
41
- ```
42
- @InProceedings{li2017dailydialog,
43
- author = {Li, Yanran and Su, Hui and Shen, Xiaoyu and Li, Wenjie and Cao, Ziqiang and Niu, Shuzi},
44
- title = {DailyDialog: A Manually Labelled Multi-turn Dialogue Dataset},
45
- booktitle = {Proceedings of The 8th International Joint Conference on Natural Language Processing (IJCNLP 2017)},
46
- year = {2017}
47
- }
48
- ```
49
 
50
- ## Training Configuration
51
- - **Learning Rate**: 2e-5
52
- - **Batch Size**: 8
53
- - **Number of Epochs**: 3
54
- - **Weight Decay**: 0.01
55
 
56
- ## Ethical Considerations
57
- Inherited from the GPT-2 base model and the DailyDialog dataset, this model may reflect biases or limitations present in its training data. Caution is advised when using it in sensitive contexts, as it could produce biased or inappropriate responses.
58
-
59
- ## How to Use
60
-
61
- ### Using the Model Directly
62
  ```python
63
- from transformers import AutoModelForCausalLM, AutoTokenizer
64
-
65
- # Load model and tokenizer
66
- model = AutoModelForCausalLM.from_pretrained("harpertoken/harpertokenConvFT")
67
- tokenizer = AutoTokenizer.from_pretrained("harpertoken/harpertokenConvFT")
68
-
69
- # Prepare input
70
- input_text = "Hello, how are you?"
71
- inputs = tokenizer(input_text, return_tensors="pt")
72
 
73
- # Generate response
74
- outputs = model.generate(**inputs)
75
- response = tokenizer.decode(outputs[0], skip_special_tokens=True)
76
- print(response)
77
  ```
78
 
79
- ### Using the Terminal
80
- Run the provided script to generate responses:
81
- ```bash
82
- python3 generate_response.py --input "Hello, how are you?"
83
- ```
84
-
85
- ### Using the API
86
- **Check API Status:**
87
- ```bash
88
- curl http://localhost:8000/status
89
- ```
90
-
91
- **Generate a Response:**
92
- ```bash
93
- curl -X POST http://localhost:8000/chat -H "Content-Type: application/json" -d '{"input_text": "Hello, how are you?"}'
94
- ```
95
-
96
- ### Using FastAPI Documentation
97
- Interact with the API via the browser at:
98
- [http://localhost:8000/docs#/default/generate_response_chat_post](http://localhost:8000/docs#/default/generate_response_chat_post)
99
-
100
- ## Related Models
101
 
102
- - **harpertokenConvAI**: [https://huggingface.co/harpertoken/harpertokenConvAI](https://huggingface.co/harpertoken/harpertokenConvAI) - DistilBERT-based model for question answering. Note: This is not the base model for harpertokenConvFT due to incompatible architectures (DistilBERT vs GPT-2).
103
- - **Base Model**: This model is fine-tuned from GPT-2 ([openai/gpt2](https://huggingface.co/gpt2)).
104
 
105
- ## Model Differences
106
 
107
- harpertokenConvFT is a GPT-2 model for conversational AI, while harpertokenConvAI is a DistilBERT model for question answering. They have different architectures, tokenizers, and parameters, making fine-tuning between them impossible. For truthful info, refer to the config.json files.
108
 
 
 
1
  ---
2
  license: mit
3
+ language: en
4
+ library_name: transformers
5
+ pipeline_tag: text-generation
6
+ base_model: openai-community/gpt2
7
+ datasets:
8
+ - daily_dialog
9
  tags:
 
 
10
  - gpt2
11
+ - text-generation
12
+ - dialogue
 
 
 
13
  ---
14
 
15
+ > Previously published as `harpertoken/harpertokenConvFT`. The old identifier still redirects here.
 
 
16
 
17
+ # chat
 
 
 
 
18
 
19
+ `openai-community/gpt2` further fine-tuned on DailyDialog, a corpus of short multi-turn English conversations about everyday topics. The base model is the 124M-parameter GPT-2 — `config.json` records `_name_or_path: gpt2`, twelve layers, 768 embedding dimensions. The previous version of this card declared its base model as `gpt2`, an identifier that has since moved; `openai-community/gpt2` is the current one.
 
20
 
21
+ This is a continuation, not a chat model. Nothing here establishes turn-taking, instruction following or any conversational protocol: there is no chat template in `tokenizer_config.json` and no special tokens beyond the end-of-text marker. It produces fluent English that resembles dialogue because that is what it was trained to imitate, which is a weaker property than it sounds.
 
 
 
 
22
 
23
+ The card this replaces documented a `generate_response.py` script and a FastAPI service on `localhost:8000` with `/status`, `/chat` and interactive docs endpoints. None of that is in the repository — it contains weights and tokenizer files only — so those sections have been removed. The declared perplexity, BLEU and F1 metrics likewise had no values behind them; no evaluation is recorded for this checkpoint.
 
 
 
 
 
 
 
 
 
 
 
24
 
25
+ ## Usage
 
 
 
 
26
 
 
 
 
 
 
 
27
  ```python
28
+ from transformers import pipeline
 
 
 
 
 
 
 
 
29
 
30
+ generator = pipeline("text-generation", model="harpertoken/chat")
31
+ print(generator("Hello, how are you?", max_new_tokens=60)[0]["generated_text"])
 
 
32
  ```
33
 
34
+ A `pad_token` is not configured, so batching prompts together will warn. Set `tokenizer.pad_token = tokenizer.eos_token` if you need it.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
+ ## Limitations
 
37
 
38
+ DailyDialog is scripted, crowd-sourced, and narrow — 13k conversations of polite small talk, annotated for emotion and communication acts. A model trained on it will handle greetings and farewells far better than disagreement, and will reproduce the register of that corpus rather than anything wider. Because GPT-2 is a 124M-parameter base and the fine-tuning is small, output is frequently fluent and wrong. The biases of both GPT-2 and DailyDialog carry through unchanged.
39
 
40
+ ## Attribution
41
 
42
+ GPT-2 follows Radford et al. (2018). DailyDialog is described in Li et al., *DailyDialog: A Manually Labelled Multi-turn Dialogue Dataset*, IJCNLP 2017.