---
title: internvl_food
canonical_url: "https://www.modelscope.cn/models/FlyFive/internvl_food"
md_url: "https://www.modelscope.cn/models/FlyFive/internvl_food.md"
repository: FlyFive/internvl_food
chinese_name: "InternVL美食模型"
last_updated: 2025-01-07
license: "Apache License 2.0"
pipeline_tag: image-text-to-text
tasks:
  - image-text-to-text
model_type:
  - internvl_chat
architectures:
  - InternVLChatModel
base_model:
  - OpenGVLab/InternVL2-2B
base_model_relation: finetune
parameters: 2.2B
tensor_type:
  - BF16
library_name:
  - safetensors
  - pytorch
frameworks:
  - Pytorch
language:
  - zh
inference_backends:
  - "deploy_task vlm/text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 369
stars: 1
---

# internvl_food

> internvl_food - FlyFive 在 ModelScope 开源的模型。第四期书生大模型实战，基于InternVL微调而来的美食大模型。

FlyFive/internvl_food 是 ModelScope 魔搭社区上的 2.2B 参数image-text-to-text模型，采用 Apache License 2.0 许可，基于 OpenGVLab/InternVL2-2B 构建，可用 deploy_task vlm/text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: FlyFive/internvl_food
- **License**: Apache License 2.0
- **Tasks**: image-text-to-text
- **Parameters**: 2.2B
- **Base model**: OpenGVLab/InternVL2-2B
- **Inference backends**: deploy_task vlm/text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 369
- **Stars**: 1
- **Last updated**: 2025-01-07

Source: https://www.modelscope.cn/models/FlyFive/internvl_food

---

## 模型名称与模型描述

InternVL美食模型是基于`InternVL2-2B`模型，通过在`FoodieQA`数据集上进行微调，以提升美食相关知识的能力。


## 适用范围

和美食相关的需求，包括：
- 美食属于哪个菜系。
- 描述美食的滋味。
- 这道美食属于中国那个区域。
- 这道美食摆盘或者上菜有什么特点。

## 模型下载

SDK下载
```bash
#安装ModelScope
pip install modelscope
```
```python
#SDK模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('FlyFive/internvl_food')
```
Git下载
```
#Git模型下载
git clone https://www.modelscope.cn/FlyFive/internvl_food.git
```

## 示例代码
```
## 1.导入相关依赖包
from lmdeploy import pipeline, TurbomindEngineConfig, GenerationConfig
from lmdeploy.vl import load_image

## 2.使用你的模型初始化推理管线
model_path = "your_model_path"
pipe = pipeline(model_path,
                backend_config=TurbomindEngineConfig(session_len=8192))
                
## 3.读取图片（此处使用PIL读取也行）
image = load_image('your_image_path')

## 4.配置推理参数
gen_config = GenerationConfig(top_p=0.8, temperature=0.8)
## 5.利用 pipeline.chat 接口 进行对话，需传入生成参数
sess = pipe.chat(('describe this image', image), gen_config=gen_config)
print(sess.response.text)
## 6.之后的对话轮次需要传入之前的session，以告知模型历史上下文
sess = pipe.chat('What is the woman doing?', session=sess, gen_config=gen_config)
print(sess.response.text)
```
