Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add inference section #529

Merged
merged 10 commits into from
Sep 8, 2022
Merged

docs: add inference section #529

merged 10 commits into from
Sep 8, 2022

Conversation

bwanglzu
Copy link
Member

@bwanglzu bwanglzu commented Sep 8, 2022

Improve three examples with inference section: https://ft-docs-improve-examples--jina-docs.netlify.app/docs-improve-examples/tasks/text-to-text/#inference


  • This PR references an open issue
  • I have added a line about this change to CHANGELOG

@bwanglzu bwanglzu marked this pull request as ready for review September 8, 2022 13:19
```

That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integrate the

print(test_da.embeddings)
```

That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integrate the

Check out [clip-as-service](https://clip-as-service.jina.ai/user-guides/finetuner/?highlight=finetuner#fine-tune-models) to know how to plug-in fine-tuned model there.

That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integrate the

```

Check out [clip-as-service](https://clip-as-service.jina.ai/user-guides/finetuner/?highlight=finetuner#fine-tune-models) to know how to plug-in fine-tuned model there.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to learn how to plug-in a finetuned CLIP model to our CLIP specific service.

When fine-tuning CLIP, we are fine-tuning the CLIPVisionEncoder and CLIPTextEncoder in parallel.
The artifact contains two models: `clip-vision` and `clip-text`.
The parameter `select_model` tells finetune which model to use for inference, in the above example,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finetuner

The artifact contains two models: `clip-vision` and `clip-text`.
The parameter `select_model` tells finetune which model to use for inference, in the above example,
we use `clip-text` to encode a Document with text.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with text content


Now you saved the `artifact` into your host machine,
let's use fine-tuned model to encode a new `Document`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the fine-tuned model


Now you saved the `artifact` into your host machine,
let's use fine-tuned model to encode a new `Document`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the

## Inference

Now you saved the `artifact` into your host machine,
let's use fine-tuned model to encode a new `Document`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the

Copy link
Member

@guenthermi guenthermi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some minor grammatical suggestions


Now you saved the `artifact` into your host machine,
let's use fine-tuned model to encode a new `Document`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let's use fine-tuned model to encode a new `Document`.
let's use the fine-tuned model to encode a new `Document`:

```

That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
That's it! If you want to integrate a fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.


Now you saved the `artifact` into your host machine,
let's use fine-tuned model to encode a new `Document`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let's use fine-tuned model to encode a new `Document`.
let's use the fine-tuned model to encode a new `Document`.

When fine-tuning CLIP, we are fine-tuning the CLIPVisionEncoder and CLIPTextEncoder in parallel.
The artifact contains two models: `clip-vision` and `clip-text`.
The parameter `select_model` tells finetune which model to use for inference, in the above example,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The parameter `select_model` tells finetune which model to use for inference, in the above example,
The parameter `select_model` tells finetuner which model to use for inference, in the above example,

```

Check out [clip-as-service](https://clip-as-service.jina.ai/user-guides/finetuner/?highlight=finetuner#fine-tune-models) to know how to plug-in fine-tuned model there.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Check out [clip-as-service](https://clip-as-service.jina.ai/user-guides/finetuner/?highlight=finetuner#fine-tune-models) to know how to plug-in fine-tuned model there.
Check out [clip-as-service](https://clip-as-service.jina.ai/user-guides/finetuner/?highlight=finetuner#fine-tune-models) to know how to plug-in fine-tuned models there.

Check out [clip-as-service](https://clip-as-service.jina.ai/user-guides/finetuner/?highlight=finetuner#fine-tune-models) to know how to plug-in fine-tuned model there.

That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
That's it! If you want to integrate a fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.

## Inference

Now you saved the `artifact` into your host machine,
let's use fine-tuned model to encode a new `Document`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let's use fine-tuned model to encode a new `Document`.
let's use the fine-tuned model to encode a new `Document`.

print(test_da.embeddings)
```

That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
That's it! If you want to integrate fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.
That's it! If you want to integrate a fine-tuned model into your Jina Flow, please check out {ref}`integrated with the Jina ecosystem <integrate-with-jina>`.

@github-actions github-actions bot removed the area/core label Sep 8, 2022
@github-actions github-actions bot added the area/testing This issue/PR affects testing label Sep 8, 2022
@github-actions
Copy link

github-actions bot commented Sep 8, 2022

📝 Docs are deployed on https://ft-docs-improve-examples--jina-docs.netlify.app 🎉

@bwanglzu bwanglzu merged commit 509f1dc into main Sep 8, 2022
@bwanglzu bwanglzu deleted the docs-improve-examples branch September 8, 2022 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs area/testing This issue/PR affects testing size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants