Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- mlx
|
4 |
+
- gpt-oss-120b
|
5 |
+
- yuval-noah-harari
|
6 |
+
- text-generation
|
7 |
+
- ai-ethics
|
8 |
+
- storytelling
|
9 |
+
- apple-silicon
|
10 |
+
---
|
11 |
+
**Model Card: MLX GPT-OSS-120B: Yuval Noah Harari Lecture Analysis**
|
12 |
+
|
13 |
+
---
|
14 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
15 |
+
This is a comprehensive project demonstrating the capabilities of the **GPT-OSS-120B-MXFP4-Q4** model, a 120-billion parameter language model quantized to 4-bit precision and optimized for Apple's MLX framework. The project uses this massive model to perform a deep, multi-faceted analysis of a seminal lecture by historian Yuval Noah Harari on "Storytelling, Human Cooperation, and the Rise of AI."
|
16 |
+
|
17 |
+
### Model Description
|
18 |
+
|
19 |
+
- **Developed by:** [TroglodyteDerivations]
|
20 |
+
- **Model type:** Transformer-based Causal Language Model
|
21 |
+
- **Language(s) (NLP):** Primarily English
|
22 |
+
- **License:** Refer to the original [GPT-OSS-120B](https://huggingface.co/mlx-community/gpt-oss-120b-MXFP4-Q4) model card.
|
23 |
+
- **Finetuned from model:** [mlx-community/gpt-oss-120b-MXFP4-Q4](https://huggingface.co/mlx-community/gpt-oss-120b-MXFP4-Q4)
|
24 |
+
|
25 |
+
## Project Overview
|
26 |
+
|
27 |
+
This repository contains a suite of Python scripts that download the massive GPT-OSS-120B model and use it to generate a rich analysis of complex philosophical and technological themes. The project showcases the model's ability to understand, summarize, debate, and create visual content based on a dense, thematic lecture.
|
28 |
+
|
29 |
+
### Key Features of this Project:
|
30 |
+
- **Multi-Length Summarization:** Generates concise summaries from 10 to 300 words.
|
31 |
+
- **Debate Generation:** Creates structured arguments for and against rapid AI development.
|
32 |
+
- **Content Creation:** Produces professional articles, editorials, and Q&A sessions.
|
33 |
+
- **Data Visualization:** Generates interactive charts (word frequency, topic distribution, radar charts) and word clouds using Plotly and Matplotlib.
|
34 |
+
- **Creative Design:** Outputs prompts for graphic t-shirt designs based on the lecture's core themes, tailored for platforms like Flux1 and Krea.dev.
|
35 |
+
- **Timeline Analysis:** Processes timestamp data to create structured timelines of the lecture.
|
36 |
+
|
37 |
+
## How to Use
|
38 |
+
|
39 |
+
This project requires an Apple Silicon Mac with significant RAM (>=64GB recommended) and the MLX framework.
|
40 |
+
|
41 |
+
1. **Clone the Repository:**
|
42 |
+
```bash
|
43 |
+
git clone https://huggingface.co/your-username/mlx-gpt-oss-120b-yuval-harari-analysis
|
44 |
+
cd mlx-gpt-oss-120b-yuval-harari-analysis
|
45 |
+
```
|
46 |
+
|
47 |
+
2. **Install Dependencies:**
|
48 |
+
```bash
|
49 |
+
pip install -r requirements.txt
|
50 |
+
```
|
51 |
+
*Key dependencies: `mlx`, `mlx-lm`, `huggingface-hub`, `plotly`, `wordcloud`, `transformers`.*
|
52 |
+
|
53 |
+
3. **Download the Model (~60-70GB):**
|
54 |
+
```bash
|
55 |
+
python download_GPT_OSS_120B_MXFP4_Q4_Model.py --output-dir ./my_model
|
56 |
+
```
|
57 |
+
|
58 |
+
4. **Run the Comprehensive Demo:**
|
59 |
+
Ensure the lecture transcript and timestamp files are in the root directory, then run:
|
60 |
+
```bash
|
61 |
+
python gpt_oss_120b_demo_final.py
|
62 |
+
```
|
63 |
+
This will run the full analysis and save all outputs (summaries, articles, visualizations, etc.) into a timestamped directory.
|
64 |
+
|
65 |
+
### Inference Code Example
|
66 |
+
|
67 |
+
The main interaction with the model is handled through the `GPTOSSDemo` class:
|
68 |
+
|
69 |
+
```python
|
70 |
+
from gpt_oss_120b_demo_final import GPTOSSDemo
|
71 |
+
|
72 |
+
# Initialize and run the complete analysis
|
73 |
+
demo = GPTOSSDemo()
|
74 |
+
demo.load_data("lecture_transcript.txt", "timestamps.json")
|
75 |
+
summary = demo.generate_summaries()
|
76 |
+
debate = demo.generate_debate()
|
77 |
+
# ... etc.
|
78 |
+
```
|
79 |
+
|
80 |
+
For a direct chat interface, use:
|
81 |
+
```bash
|
82 |
+
python gpt_oss_chat.py
|
83 |
+
```
|
84 |
+
|
85 |
+
## Training Data
|
86 |
+
|
87 |
+
This project does not fine-tune the base model. The base model, **GPT-OSS-120B**, was trained on a vast and diverse dataset of text and code. The unique value of this project lies in the **prompt engineering** and **orchestration logic** used to guide the pre-trained model to produce specific, high-quality outputs based on the provided Yuval Harari lecture content.
|
88 |
+
|
89 |
+
## Output Analysis
|
90 |
+
|
91 |
+
The model successfully engages with complex themes from the lecture, including:
|
92 |
+
- The role of storytelling in human evolution and cooperation.
|
93 |
+
- The existential risks and ethical dilemmas posed by advanced AI.
|
94 |
+
- The "alignment problem" and the analogy of AI as an alien intelligence.
|
95 |
+
- The potential collapse of trust in human institutions.
|
96 |
+
- The future of human exceptionalism in an age of artificial intelligences.
|
97 |
+
|
98 |
+
## Environmental Impact
|
99 |
+
|
100 |
+
- **Hardware Type:** Apple M3 Ultra (Apple Silicon)
|
101 |
+
- **Energy consumed:** Significant. Inference with 120B parameter models is computationally intensive.
|
102 |
+
- **Carbon Emitted:** While Apple Silicon is energy-efficient, extended use of large models has a carbon footprint. The total impact depends on the duration of analysis.
|
103 |
+
|
104 |
+
## Citation
|
105 |
+
|
106 |
+
**Original Model:**
|
107 |
+
```bibtex
|
108 |
+
@misc{gpt-oss-120b-mxfp4-q4,
|
109 |
+
author = {MLX Community},
|
110 |
+
title = {GPT-OSS-120B-MXFP4-Q4},
|
111 |
+
publisher = {Hugging Face},
|
112 |
+
journal = {Hugging Face Hub},
|
113 |
+
howpublished = {\url{https://huggingface.co/mlx-community/gpt-oss-120b-MXFP4-Q4}},
|
114 |
+
}
|
115 |
+
```
|
116 |
+
|
117 |
+
**Lecture Content:**
|
118 |
+
*Based on the ideas and themes presented by Yuval Noah Harari.*
|
119 |
+
|
120 |
+
## Limitations and Ethical Considerations
|
121 |
+
|
122 |
+
- **Bias:** As a large language model, GPT-OSS-120B can reflect biases present in its training data. Its analysis of Harari's work should be considered an interpretation, not an objective truth.
|
123 |
+
- **Hallucination:** The model can sometimes generate plausible but incorrect or fabricated information. All outputs should be critically evaluated by a human.
|
124 |
+
- **Resource Intensity:** Running a 120B parameter model is only feasible on high-end hardware, limiting accessibility and contributing to energy consumption.
|
125 |
+
- **Context Length:** The model's context window limits the amount of lecture text that can be processed in a single prompt.
|
126 |
+
|
127 |
+
This project is intended for demonstration and research purposes to explore the capabilities and implications of large language models on Apple hardware.
|