Skip to content

Commit

Permalink
Merge pull request #269 from mfumanelli/fix_typos
Browse files Browse the repository at this point in the history
[Speedster] Fix typos and update benchmarks
  • Loading branch information
diegofiori authored Mar 21, 2023
2 parents f7f8edc + 4276314 commit bd38730
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 38 deletions.
28 changes: 14 additions & 14 deletions apps/accelerate/speedster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

`Speedster` is an open-source module designed to speed up AI inference in just a few lines of code. The library automatically applies the best set of SOTA optimization techniques to achieve the maximum inference speed-up (latency, throughput, model size) physically possible on your hardware (single machine).

`Speedster` makes it easy to combine optimization techniques across the whole software to hardware stack, delivering best in class speed-ups. If you like the idea, give us a star to support the project 
`Speedster` makes it easy to combine optimization techniques across the whole software-to-hardware stack, delivering best-in-class speed-ups. If you like the idea, give us a star to support the project

![speedster_benchmarks](https://user-images.githubusercontent.com/42771598/212486740-431328f3-f1e5-47bf-b6c9-b6629399ad09.png)
![speedster](https://user-images.githubusercontent.com/53374883/225599469-f1a626f0-c001-42bd-bc8b-ec0e966ddad6.png)

The core `Speedster` workflow consists of 3 steps:

Expand Down Expand Up @@ -79,13 +79,13 @@ optimized_model = load_model("model_save_path")

output = optimized_model(input_sample)
```
For more details, please visit [Getting Started with PyTorch optimization](https://docs.nebuly.com/Speedster/getting_started/pytorch_getting_started/).
For more details, please visit [Getting Started with PyTorch Optimization](https://docs.nebuly.com/Speedster/getting_started/pytorch_getting_started/).

</details>
<details>
<summary>🤗 HuggingFace Transformers </summary>
<summary>🤗 Hugging Face Transformers </summary>

In this section, we will learn about the 4 main steps needed to optimize 🤗 Huggingface Transformer models:
In this section, we will learn about the 4 main steps needed to optimize 🤗 Hugging Face Transformer models:

1) Input your model and data
2) Run the optimization
Expand All @@ -98,7 +98,7 @@ In this section, we will learn about the 4 main steps needed to optimize 🤗 Hu
from transformers import AlbertModel, AlbertTokenizer
from speedster import optimize_model, save_model

#1a. Provide input model: Load Albert as example
#1a. Provide input model: Load Albert as an example
model = AlbertModel.from_pretrained("albert-base-v1")
tokenizer = AlbertTokenizer.from_pretrained("albert-base-v1")

Expand Down Expand Up @@ -141,7 +141,7 @@ In this section, we will learn about the 4 main steps needed to optimize 🤗 Hu
from transformers import T5Tokenizer, T5ForConditionalGeneration
from speedster import optimize_model, save_model

#1a. Provide input model: Load T5 as example
#1a. Provide input model: Load T5 as an example
model = T5ForConditionalGeneration.from_pretrained("t5-small")
tokenizer = T5Tokenizer.from_pretrained("t5-small")

Expand Down Expand Up @@ -182,7 +182,7 @@ In this section, we will learn about the 4 main steps needed to optimize 🤗 Hu
</details>

<details>
<summary>🧨 HuggingFace Diffusers </summary>
<summary>🧨 Hugging Face Diffusers </summary>

In this section, we will learn about the 4 main steps needed to optimize Stable Diffusion models from the Diffusers library:

Expand Down Expand Up @@ -239,7 +239,7 @@ optimized_model = load_model("model_save_path", pipe=pipe)
test_prompt = "futuristic llama with a cyberpunk city on the background"
output = optimized_model(test_prompt).images[0]
```
For more details, please visit [Getting Started with StableDiffusion optimization](https://docs.nebuly.com/Speedster/getting_started/diffusers_getting_started/).
For more details, please visit [Getting Started with Stable Diffusion optimization](https://docs.nebuly.com/Speedster/getting_started/diffusers_getting_started/).

</details>

Expand Down Expand Up @@ -338,8 +338,8 @@ For more details, please visit [Getting Started with ONNX optimization](https://

- [Installation](https://docs.nebuly.com/Speedster/installation/)
- [Getting started with PyTorch optimization](https://docs.nebuly.com/Speedster/getting_started/pytorch_getting_started/)
- [Getting started with HuggingFace optimization](https://docs.nebuly.com/Speedster/getting_started/hf_getting_started/)
- [Getting started with StableDiffusion optimization](https://docs.nebuly.com/Speedster/getting_started/diffusers_getting_started/)
- [Getting started with Hugging Face optimization](https://docs.nebuly.com/Speedster/getting_started/hf_getting_started/)
- [Getting started with Stable Diffusion optimization](https://docs.nebuly.com/Speedster/getting_started/diffusers_getting_started/)
- [Getting started with TensorFlow optimization](https://docs.nebuly.com/Speedster/getting_started/tf_getting_started/)
- [Getting started with ONNX optimization](https://docs.nebuly.com/Speedster/getting_started/onnx_getting_started/)
- [Key concepts](https://docs.nebuly.com/Speedster/key_concepts/)
Expand All @@ -350,7 +350,7 @@ For more details, please visit [Getting Started with ONNX optimization](https://

# **Key concepts**

`Speedster`'s design reflects our mission to automatically master each and every existing AI acceleration techniques to deliver the **fastest AI ever**. As a result, `Speedster` leverages available enterprise-grade open-source optimization tools. If these tools and communities already exist, and are distributed under a permissive license (Apache, MIT, etc), we integrate them and happily contribute to their communities. However, many tools do not exist yet, in which case we implement them and open-source the code so that our community can benefit from it.
`Speedster`'s design reflects our mission to automatically master each and every existing AI acceleration technique to deliver the **fastest AI ever**. As a result, `Speedster` leverages available enterprise-grade open-source optimization tools. If these tools and communities already exist, and are distributed under a permissive license (Apache, MIT, etc), we integrate them and happily contribute to their communities. However, many tools do not exist yet, in which case we implement them and open-source the code so that our community can benefit from it.

`Speedster` is shaped around **4 building blocks** and leverages a modular design to foster scalability and integration of new acceleration components across the software to hardware stack.

Expand Down Expand Up @@ -379,12 +379,12 @@ The **compiler stage** leverages the following open-source projects:


# **Community**
We’re developing `Speedster` for and together with our community, so plase get in touch on GitHub or Discord.
We’re developing `Speedster` for and together with our community, so please get in touch on GitHub or Discord.

**[GitHub issues](https://github.com/nebuly-ai/nebullvm/issues)**: suggest new acceleration components, request new features, and report bugs and improvements.

**[Discord](https://discord.gg/RbeQMu886J)**: learn about AI acceleration, share exciting projects and hang out with our global community.

The best way to get started is to pick a good-first issue. Please read our [contribution guidelines](https://docs.nebuly.com/contributions/) for a deep dive on how to best contribute to our project!
The best way to get started is to pick a good-first issue. Please read our [contribution guidelines](https://docs.nebuly.com/contributions/) for a deep dive into how to best contribute to our project!

Don't forget to leave a star ⭐ to support the project and happy acceleration 🚀
4 changes: 2 additions & 2 deletions apps/accelerate/speedster/docs/en/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The library allows you to seamlessy modulate the inference performances of your

`Speedster` makes it easy to combine optimization techniques across the whole software to hardware stack, delivering best in class speed-ups. If you like the idea, give us a star to support the project ⭐

![speedster_benchmarks](https://user-images.githubusercontent.com/42771598/212486740-431328f3-f1e5-47bf-b6c9-b6629399ad09.png)
![speedster](https://user-images.githubusercontent.com/53374883/225600620-1cd84073-d9b3-43d1-84fa-c3e6c25eb915.png)

The core `Speedster` workflow consists of 3 steps:

Expand All @@ -17,4 +17,4 @@ The core `Speedster` workflow consists of 3 steps:
- [x] **Search**: the library automatically tests every combination of optimization techniques across the software-to-hardware stack (sparsity, quantization, compilers, etc.) that is compatible with your needs and local hardware.
- [x] **Serve**: finally, `Speedster` chooses the best configuration of optimization techniques and returns an accelerated version of your model in the DL framework of your choice (just on steroids 🚀).

Now you are ready to start accelerating your models, visit the [Installation](installation.md) section to start right away!
Now you are ready to start accelerating your models, visit the [Installation](installation.md) section to start right away!
Original file line number Diff line number Diff line change
Expand Up @@ -259,28 +259,6 @@
" pipe = StableDiffusionPipeline.from_pretrained(model_id)\n"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "f7653250",
"metadata": {},
"source": [
"We can easily test the loaded model by generating a sample image"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7b640885",
"metadata": {},
"outputs": [],
"source": [
"test_prompt = \"futuristic llama with a cyberpunk city on the background\"\n",
"\n",
"pipe.to(device)\n",
"pipe(test_prompt).images[0]"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down Expand Up @@ -428,6 +406,16 @@
"If everything worked correctly, let's check the output of the optimized model"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7b640885",
"metadata": {},
"outputs": [],
"source": [
"test_prompt = \"futuristic llama with a cyberpunk city on the background\"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit bd38730

Please sign in to comment.