Local Invocation of Llama3 Large Model Development

Local Invocation of Llama3 Large Model Development

1. Test using the trained weights from transformers import AutoModelForCausalLM,AutoTokenizer,TextGenerationPipeline import torch tokenizer = AutoTokenizer.from_pretrained(r"E:\大模型AI开发\AI大模型\projects\gpt2\model\models–uer–gpt2-chinese-cluecorpussmall\snapshots\c2c0249d8a2731f269414cc3b22dff021f8e07a3") model = AutoModelForCausalLM.from_pretrained(r"E:\大模型AI开发\AI大模型\projects\gpt2\model\models–uer–gpt2-chinese-cluecorpussmall\snapshots\c2c0249d8a2731f269414cc3b22dff021f8e07a3") # Load our own trained weights (Chinese poetry) model.load_state_dict(torch.load("net.pt")) # Use the system's built-in pipeline tool to generate content pipline = TextGenerationPipeline(model,tokenizer,device=0) print(pipline("天高", max_length=24)) The performance is actually not good: 2. Post-process the AI-generated results # Customized … Read more

Using CPU for Inference of Llama Structure Large Models

Using CPU for Inference of Llama Structure Large Models

1. Review of Llama Model Basics The Llama model is built on the Transformer architecture, featuring multiple layers of attention mechanisms that enable deep semantic analysis and feature extraction of input text. This allows it to excel in natural language processing tasks such as text continuation, summarization, and machine translation. Its design philosophy aims to … Read more

Windsurf Editor: The Future Programming Assistant for Architecture

Windsurf Editor: The Future Programming Assistant for Architecture

Windsurf Editor: The Future Programming Assistant for Architecture Introduction In the architecture industry, designers and engineers rely on various software tools, such as CAD (Computer-Aided Design) and document processing software (like Word), to realize their ideas and designs. With the advancement of technology, enhancing efficiency and collaboration in design work has become a major challenge … Read more

Windsurf: A Powerful Tool for API Automation Testing

Windsurf: A Powerful Tool for API Automation Testing

I tried using Windsurf to write code for API automation testing and experienced its convenience and efficiency. Windsurf does not require high coding skills from users, while the accuracy of the generated code is relatively high. Moreover, it excels in generating test case scenario coverage. Once the code is completed, Windsurf can also automatically generate … Read more

Optimize Word Format with Windsurf: Achieve 90% Accuracy!

Optimize Word Format with Windsurf: Achieve 90% Accuracy!

Recently, I took on a big job to organize hundreds of Word documents and unify their formats. Just thinking about manually adjusting each one made me feel overwhelmed. While I was worrying, I suddenly thought of the amazing tool, Windsurf AI. After trying it out, it was truly a lifesaver! Using it to process Word … Read more

Windsurf AI Editor: A Strong Alternative to Cursor?

Windsurf AI Editor: A Strong Alternative to Cursor?

Introduction People who don’t surf the internet much might be a bit unfamiliar with Windsurf AI, but in today’s rapidly evolving AI technology landscape, developers are increasingly eager for tools that can enhance programming efficiency. Recently, the Windsurf AI editor developed by the Codeium team has emerged as a powerful alternative to Cursor, quickly gaining … Read more

WindSurf vs Cursor AI: Choosing the Right AI Code Editor

WindSurf vs Cursor AI: Choosing the Right AI Code Editor

On a sunny afternoon, I sat in front of my computer, with a gentle breeze whispering in my ear: “WindSurf or Cursor AI, that is the question.” Recently, discussions about these two AI code editors have surged online like a tsunami, leaving me confused about my choice. Since that’s the case, why not explore and … Read more

Enhance Word Editing Efficiency with Windsurf AI

Enhance Word Editing Efficiency with Windsurf AI

Windsurf AI Makes Your Word Documents Beautiful and Doubles Efficiency! Recently, I took on a big project that required me to write a bunch of business plans. You know how it is, these things are long and tedious, and just formatting can drive you crazy. While I was feeling frustrated, I suddenly remembered the Windsurf … Read more

Windsurf’s Image Recognition Capability Upgrade

Windsurf's Image Recognition Capability Upgrade

Last December, I attempted to use Windsurf and Cursor for image recognition. At that time, these tools could design web UI based on images, but they could not recognize flowcharts. Recently, I discovered that Windsurf has achieved flowchart recognition and can generate corresponding code.This enhancement undoubtedly increases the participation of AI tools in actual work. … Read more

Windsurf’s Ability to Modify Multiple Projects Simultaneously

Windsurf's Ability to Modify Multiple Projects Simultaneously

In practical work, it is very common for a requirement to be implemented through collaboration across multiple projects. For example: A web access requirement may involve modifications to both front-end and back-end projects; An order operation requirement in a microservice architecture may involve modifications to multiple microservice projects such as user, order, payment, etc., which … Read more