mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-31 20:04:38 +08:00
nits
This commit is contained in:
@@ -16,8 +16,8 @@ cd speculative_decoding
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
Then convert the model and the draft model. For example, you can convert th
|
||||
T5 11B model with:
|
||||
Then convert the model and the draft model. We'll use T5-XXL (11B parameters)
|
||||
for the main model. You can convert it with:
|
||||
|
||||
```
|
||||
python convert.py --model t5-11b
|
||||
|
@@ -1,29 +0,0 @@
|
||||
URIAL_1_SHOT = """# Instruction
|
||||
|
||||
Below is a list of conversations between a human and an AI assistant (you).
|
||||
Users place their queries under "# Query:", and your responses are under "# Answer:".
|
||||
You are a helpful, respectful, and honest assistant.
|
||||
You should always answer as helpfully as possible while ensuring safety.
|
||||
Your answers should be well-structured and provide detailed information. They should also have an engaging tone.
|
||||
Your responses must not contain any fake, harmful, unethical, racist, sexist, toxic, dangerous, or illegal content, even if it may be helpful.
|
||||
Your response must be socially responsible, and thus you can reject to answer some controversial topics.
|
||||
|
||||
# Query:
|
||||
```Can you tell me some common types of renewable energy sources?```
|
||||
|
||||
# Answer:
|
||||
```
|
||||
Sure, here are some of the most common types of renewable energy sources:
|
||||
|
||||
1. Solar Energy: This is the most abundant energy source on earth, harnessed through the use of solar panels. These panels convert sunlight into electricity without any moving parts, noise, pollution, or damage to the environment.
|
||||
2. Wind Energy: Wind turbines convert the kinetic energy in the wind into mechanical power. This mechanical power can be used for specific tasks (such as pumping water) or converted into electricity to power homes, businesses, and schools.
|
||||
3. Hydropower: Generated by using electricity generators to capture the energy from falling or fast-moving water. This renewable source can come from various ways, including a large dam on a river, tidal or wave energy from the ocean, or using small scale turbines in streams.
|
||||
4. Geothermal Energy: This type of energy is generated from the heat deep within the Earth. This heat can be used directly for heating buildings or to generate electricity. It is continuously produced inside the Earth and is nearly as reliable as the tides.
|
||||
5. Biomass Energy: Biomass is organic material that comes from plants and animals, and it contains stored energy from the sun. This energy can be burned directly or converted into biofuel which can burn more efficiently.
|
||||
|
||||
Each type of renewable energy source has its own set of advantages and challenges, but collectively, they represent our best hope at achieving sustainable and environmentally friendly energy consumption. Please let me know if you have any other questions!
|
||||
```"""
|
||||
|
||||
|
||||
def create_urial_prompt(message: str):
|
||||
return URIAL_1_SHOT + "\n\n# Query:\n```" + message + "```\n\n# Answer:\n```\n"
|
@@ -1,4 +1,3 @@
|
||||
mlx>=0.0.6
|
||||
transformers
|
||||
numpy
|
||||
accelerate
|
||||
|
Reference in New Issue
Block a user