mirror of
				https://github.com/hiyouga/LLaMA-Factory.git
				synced 2025-11-04 09:52:14 +08:00 
			
		
		
		
	[assets] update readme (#8461)
This commit is contained in:
		
							parent
							
								
									4407231a3b
								
							
						
					
					
						commit
						abc6ce6168
					
				@ -173,7 +173,7 @@ An additional column `audios` is required. Please refer to the [sharegpt](#share
 | 
			
		||||
 | 
			
		||||
Compared to the alpaca format, the sharegpt format allows the datasets have **more roles**, such as human, gpt, observation and function. They are presented in a list of objects in the `conversations` column.
 | 
			
		||||
 | 
			
		||||
Note that the human and observation should appear in odd positions, while gpt and function should appear in even positions.
 | 
			
		||||
Note that the human and observation should appear in odd positions, while gpt and function should appear in even positions. The gpt and function will be learned by the model.
 | 
			
		||||
 | 
			
		||||
```json
 | 
			
		||||
[
 | 
			
		||||
 | 
			
		||||
@ -172,7 +172,7 @@ KTO 数据集需要提供额外的 `kto_tag` 列。详情请参阅 [sharegpt](#s
 | 
			
		||||
 | 
			
		||||
相比 alpaca 格式的数据集,sharegpt 格式支持**更多的角色种类**,例如 human、gpt、observation、function 等等。它们构成一个对象列表呈现在 `conversations` 列中。
 | 
			
		||||
 | 
			
		||||
注意其中 human 和 observation 必须出现在奇数位置,gpt 和 function 必须出现在偶数位置。
 | 
			
		||||
注意其中 human 和 observation 必须出现在奇数位置,gpt 和 function 必须出现在偶数位置。默认所有的 gpt 和 function 会被用于学习。
 | 
			
		||||
 | 
			
		||||
```json
 | 
			
		||||
[
 | 
			
		||||
 | 
			
		||||
@ -28,14 +28,17 @@ if TYPE_CHECKING:
 | 
			
		||||
 | 
			
		||||
def get_device_memory() -> "gr.Slider":
 | 
			
		||||
    free, total = get_current_memory()
 | 
			
		||||
    used = round((total - free) / (1024**3), 2)
 | 
			
		||||
    total = round(total / (1024**3), 2)
 | 
			
		||||
    return gr.Slider(minimum=0, maximum=total, value=used, step=0.01)
 | 
			
		||||
    if total != -1:
 | 
			
		||||
        used = round((total - free) / (1024**3), 2)
 | 
			
		||||
        total = round(total / (1024**3), 2)
 | 
			
		||||
        return gr.Slider(minimum=0, maximum=total, value=used, step=0.01, visible=True)
 | 
			
		||||
    else:
 | 
			
		||||
        return gr.Slider(visible=False)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def create_footer() -> dict[str, "Component"]:
 | 
			
		||||
    with gr.Row():
 | 
			
		||||
        device_memory = gr.Slider(interactive=False)
 | 
			
		||||
        device_memory = gr.Slider(visible=False, interactive=False)
 | 
			
		||||
        timer = gr.Timer(value=5)
 | 
			
		||||
 | 
			
		||||
    timer.tick(get_device_memory, outputs=[device_memory], queue=False)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user